[Bug preprocessor/8270] [4.2/4.3/4.4 Regression] back-slash white space newline with comments, no warning

2008-12-06 Thread pinskia at gcc dot gnu dot org


--- Comment #39 from pinskia at gcc dot gnu dot org  2008-12-07 01:01 
---
From JSM in PR 38433:

On Sat, 6 Dec 2008, eric dot niebler at gmail dot com wrote:

 In the attached file, there is a comment terminated with a line-termination
 character (\) followed by spaces. This should NOT be considered a line
 terminator, yet gcc considers it as such. From 2.1/2 in the C++03 standard:
 
 Each instance of a new-line character and an immediately preceding backslash
 character is deleted, splicing physical source lines to form logical source
 lines.

This (removal of such spaces) is part of how GCC defines the 
implementation-defined mapping in translation phase 1.  There are no input 
files that GCC interprets as representing a program that enters phase 2 
with backslash-space at the end of a line.

 That is, only backslashes immediately followed by a newline are considered 
 line
 terminators. The existing behavior of gcc violates the standard and conflicts
 with the behavior of other popular C++ compilers (EDG, MSVC).

No, it conforms to the standard but does not allow certain programs to be 
represented.  (I think this is a bad idea, but that's another matter.)

--- CUT ---
Which explains why this is conforming to the standard and is allowed.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8270



[Bug preprocessor/8270] [4.2/4.3/4.4 Regression] back-slash white space newline with comments, no warning

2008-12-06 Thread pinskia at gcc dot gnu dot org


--- Comment #38 from pinskia at gcc dot gnu dot org  2008-12-07 00:58 
---
*** Bug 38433 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||eric dot niebler at gmail
   ||dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8270



[Bug preprocessor/8270] [4.2/4.3/4.4 Regression] back-slash white space newline with comments, no warning

2008-07-04 Thread jsm28 at gcc dot gnu dot org


--- Comment #37 from jsm28 at gcc dot gnu dot org  2008-07-04 16:28 ---
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|[4.1/4.2/4.3/4.4 Regression]|[4.2/4.3/4.4 Regression]
   |back-slash white space  |back-slash white space
   |newline with comments, no   |newline with comments, no
   |warning |warning
   Target Milestone|4.1.3   |4.2.5


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8270