From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 62B553835414; Mon, 7 Jun 2021 14:46:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 62B553835414 To: gcc-cvs-wwwdocs@gcc.gnu.org Subject: gcc-wwwdocs branch master updated. 9f1723bc1d6b52fcfcfc4a8aee93eada98412e78 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: bbbf05e7f3d3e7a74d23e8cc252ebae895158abe X-Git-Newrev: 9f1723bc1d6b52fcfcfc4a8aee93eada98412e78 Message-Id: <20210607144659.62B553835414@sourceware.org> Date: Mon, 7 Jun 2021 14:46:59 +0000 (GMT) From: Jonathan Wakely X-BeenThere: gcc-cvs-wwwdocs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs-wwwdocs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2021 14:46:59 -0000 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "gcc-wwwdocs". The branch, master has been updated via 9f1723bc1d6b52fcfcfc4a8aee93eada98412e78 (commit) from bbbf05e7f3d3e7a74d23e8cc252ebae895158abe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9f1723bc1d6b52fcfcfc4a8aee93eada98412e78 Author: Jonathan Wakely Date: Mon Jun 7 11:00:22 2021 +0100 Add HTML anchors to GCC 5 "porting to" notes diff --git a/htdocs/gcc-5/porting_to.html b/htdocs/gcc-5/porting_to.html index 7d629e78..c359dfb2 100644 --- a/htdocs/gcc-5/porting_to.html +++ b/htdocs/gcc-5/porting_to.html @@ -28,7 +28,7 @@ manner. Additions and suggestions for improvement are welcome.

-

Preprocessor issues

+

Preprocessor issues

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. -

C language issues

+

C language issues

-

Default standard is now GNU11

+

Default standard is now GNU11

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.

-

Different semantics for inline functions

+

Different semantics for inline functions

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:

} -

Some warnings are enabled by default

+

Some warnings are enabled by default

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.

-

Initializing statics with compound literals

+

Initializing statics with compound literals

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__ macro

As 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.

-

Different meaning of the %a *scanf conversion specification

+

Different meaning of the %a *scanf conversion specification

In 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[...].

-

New warnings

+

New warnings

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:

-

C++ language issues

+

C++ language issues

-

Converting std::nullptr_t to bool

+

Converting 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. -

Return by converting move constructor

+

Return by converting move constructor

GCC 5 implements DR 1579 @@ -430,7 +430,7 @@ using return X(y); or

-

Links

+

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