From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
The preprocessor started to emit line markers to properly distinguish
whether a macro token comes from a system header, or from a normal header
@@ -65,9 +65,9 @@ Observe how the exitfailure
and 1
tokens
are not on the same line anymore.
-
GCC defaults to -std=gnu11
instead of -std=gnu89
.
This brings several changes that users should be aware of. The following
@@ -84,7 +84,7 @@ former warns about features not present in ISO C90, but present in ISO C99.
The latter warns about features not present in ISO C99, but present in
ISO C11. See the GCC manual for more info.
While -std=gnu89
employs the GNU89 inline semantics,
-std=gnu11
uses the C99 inline semantics. The C99 inline semantics
@@ -184,7 +184,7 @@ standard due to multiple definition errors:
The C99 mode enables some warnings by default. For instance, GCC warns about missing declarations of functions:
@@ -267,7 +267,7 @@ returning no value in a function returning non-void:The fix is either to specify a proper return value, or to declare the return
type of foo
as void
.
Previously, initializing objects with static storage duration with compound literals was only allowed in the GNU89 mode. This restriction has been lifted @@ -296,7 +296,7 @@ snippet is an example of such initialization:
^ -__STDC_VERSION__
macro__STDC_VERSION__
macroAs the default mode changed to C11, the __STDC_VERSION__
standard macro, introduced in C95, is now defined by default, and has
@@ -314,7 +314,7 @@ the value 201112L
.
You can check the macro using gcc -dM -E -std=gnu11 - < /dev/null | grep STDC_VER
.
%a *scanf
conversion specification%a *scanf
conversion specificationIn C89, the GNU C library supports dynamic allocation via the %as
,
%aS
, and %a[...]
conversion specifications; see
@@ -346,7 +346,7 @@ This is a change in semantics, and in combination with the
m
as a length modifier as per POSIX.1-2008. That is, use
%ms
or %m[...]
.
Several new warnings have been added to the C front end. Among others
-Wpedantic
now warns about non-standard predefined identifiers.
@@ -374,9 +374,9 @@ For instance:
std::nullptr_t
to bool
std::nullptr_t
to bool
Converting std::nullptr_t
to bool
in C++11
mode now requires direct-initialization. This has been changed in
@@ -397,7 +397,7 @@ mode now requires direct-initialization. This has been changed in
It is recommended to use the false
keyword instead of
converting nullptr
to bool
.
-
GCC 5 implements
DR 1579
@@ -430,7 +430,7 @@ using return X(y);
or
Marek Polacek and Jakub Jelinek, ----------------------------------------------------------------------- Summary of changes: htdocs/gcc-5/porting_to.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) hooks/post-receive -- gcc-wwwdocs