This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38433] New: Incorrect handling of line termination character with trailing spaces


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

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


-- 
           Summary: Incorrect handling of line termination character with
                    trailing spaces
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eric dot niebler at gmail dot com
 GCC build triplet: Configured with: ../gcc-4.3.0/configure --enable-
                    languages=c,c++
GCC target triplet: i686-pc-cygwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]