mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-09-28 03:20:44 +02:00
updated to gitlab, [[fallthrough]] requires semicolon
This commit is contained in:
parent
24cac68f9b
commit
b30f5874b3
4 changed files with 13 additions and 5 deletions
|
@ -1,2 +1,2 @@
|
|||
#define VERSION "10.9.2"
|
||||
#define VERSION "10.9.3"
|
||||
#define YEARS "1994-2018"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
C++-annotations (10.9.3)
|
||||
|
||||
* Migrated from Github to Gitlab
|
||||
* WIP adding elements of the upcoming c++2a standard.
|
||||
|
||||
-- Frank B. Brokken <f.b.brokken@rug.nl> Mon, 25 Jun 2018 12:48:37 +0200
|
||||
|
||||
C++-annotations (10.9.2)
|
||||
|
||||
* Modified src/trim so that it can be used as stand-alone program.
|
||||
|
|
|
@ -8,7 +8,8 @@ itemization(
|
|||
When statements nested under tt(case) entries in tt(switch) statements
|
||||
continue into subsequent tt(case) or tt(default) entries the compiler issues a
|
||||
`falling through' warning. If falling through is intentional the attribute
|
||||
tt([[fallthrough]]) should be used. Here is an annotated example:
|
||||
tt([[fallthrough]]), which then must be followed by a semicolon, should be
|
||||
used. Here is an annotated example:
|
||||
verb(
|
||||
void function(int selector)
|
||||
{
|
||||
|
@ -17,7 +18,7 @@ void function(int selector)
|
|||
case 1:
|
||||
case 2: // no falling through, but merged entry points
|
||||
cout << "cases 1 and 2\n";
|
||||
[[fallthrough]] // no warning: intentionally falling through
|
||||
[[fallthrough]]; // no warning: intentionally falling through
|
||||
|
||||
case 3:
|
||||
cout << "case 3\n";
|
||||
|
@ -25,7 +26,7 @@ void function(int selector)
|
|||
case 4: // a warning is issued: falling through not
|
||||
// announced.
|
||||
cout << "case 4\n";
|
||||
[[fallthrough]] // error: there's nothing beyond
|
||||
[[fallthrough]]; // error: there's nothing beyond
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SUBST(DOCVERSION)(10.9.2)
|
||||
SUBST(DOCVERSION)(10.9.3)
|
||||
SUBST(YEARS)(1994-2018)
|
||||
|
|
Loading…
Reference in a new issue