Re: [wwwdocs] Porting to again
On Wed, 18 Feb 2015, Marek Polacek wrote: This is a revised version. I reworded the paragraph dealing with __STDC_VERSION__, made some clarifications wrt %a, and added some text wrt cpp -P issue. I made some minor changes on top of this: - Use a shorter URL for a PR reference. - Avoid a here link. - Various wording changes. With that I am nearly through for everything related to the GCC 5.1 release. ;-) Gerald Index: porting_to.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/porting_to.html,v retrieving revision 1.8 diff -u -r1.8 porting_to.html --- porting_to.html 18 Apr 2015 19:45:17 - 1.8 +++ porting_to.html 20 Apr 2015 00:22:50 - @@ -29,19 +29,20 @@ pThe preprocessor started to emit line markers to properly distinguish whether a macro token comes from a system header, or from a normal header -(see a href=https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60723;PR60723/a). -These new markers can cause intriguing problems, if the packages aren't ready +(see a href=https://gcc.gnu.org/PR60723;PR60723/a). +These new markers can cause intriguing problems for software not ready to handle them. To stop the preprocessor from generating the code#line/code -directives, use the code-P/code option, documented -a href=https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options;here/a. -Consider the following snippet:/p +directives, use +a href=https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options;the code-P/code option/a./p + +pConsider the following snippet:/p precode #include lt;stdlib.hgt; exitfailure EXIT_FAILURE /code/pre -While older gcc -E used to emit: +In the past codegcc -E/code used to emit: precode # 2 t.c 2 @@ -57,7 +58,7 @@ 1 /code/pre -As can be seen, the codeexitfailure/code and code1/code tokens +Observe how the codeexitfailure/code and code1/code tokens are not on the same line anymore.
Re: [wwwdocs] Porting to again
On Wed, Feb 18, 2015 at 01:16:55PM +0100, Jakub Jelinek wrote: On Wed, Feb 18, 2015 at 01:04:30PM +0100, Marek Polacek wrote: --- porting_to.html 10 Feb 2015 11:12:20 - 1.3 +++ porting_to.html 18 Feb 2015 12:01:50 - @@ -24,6 +24,17 @@ manner. Additions and suggestions for improvement are welcome. /p +h2Preprocessor issues/h2 + +pThe preprocessor started to emit line markers to properly distinguish +whether a macro token comes from a system header, or from a normal header +(see a href=https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60723;PR60723/a). +These new markers can cause intriguing problems, if the packages aren't ready +to handle them. To stop the preprocessor from generating the code#line/code +directives, use the code-P/code option, documented +a href=https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options;here/a. +/p I think it would be nice to give here some example, like: #include stdlib.h exitfailure EXIT_FAILURE and showing that older gcc -E used to emit # 2 test.c 2 exitfailure 1 whereas GCC 5 emits: # 2 test.c 2 # 2 test.c exitfailure # 2 test.c 3 4 1 and thus it can break simple tools that expect the tokens on a single line. Added. Otherwise, LGTM. Thanks, committed now. Marek
Re: [wwwdocs] Porting to again
On Wed, Feb 18, 2015 at 01:04:30PM +0100, Marek Polacek wrote: --- porting_to.html 10 Feb 2015 11:12:20 - 1.3 +++ porting_to.html 18 Feb 2015 12:01:50 - @@ -24,6 +24,17 @@ manner. Additions and suggestions for improvement are welcome. /p +h2Preprocessor issues/h2 + +pThe preprocessor started to emit line markers to properly distinguish +whether a macro token comes from a system header, or from a normal header +(see a href=https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60723;PR60723/a). +These new markers can cause intriguing problems, if the packages aren't ready +to handle them. To stop the preprocessor from generating the code#line/code +directives, use the code-P/code option, documented +a href=https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#Preprocessor-Options;here/a. +/p I think it would be nice to give here some example, like: #include stdlib.h exitfailure EXIT_FAILURE and showing that older gcc -E used to emit # 2 test.c 2 exitfailure 1 whereas GCC 5 emits: # 2 test.c 2 # 2 test.c exitfailure # 2 test.c 3 4 1 and thus it can break simple tools that expect the tokens on a single line. Otherwise, LGTM. Jakub