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++/15519] New: preprocessor mistreats backslash-blank-newline in // comment


In both 3.3.1 (cygwin, NT) and 3.2.2 (redhat, linux) the preprocessor
silently--and wrongly--eats the declaration below, where $ marks
have been placed to show the end of lines.  The comment was carefully
written to avoid the very misbehavior that it elicited.
To exhibit the trouble, remove the $ marks and compile with
g++ -pedantic -E

// boolean operation /\ $
extern int band(int,int);$

In some contexts g++ warns of the presence of backslash-space-newline,
but not in comments.  Under option -Wall, it reports a "multiline
comment".  The warnings do not, however, point out that the g++
interpretation is nonstandard, even in -pedantic mode.

-- 
           Summary: preprocessor mistreats backslash-blank-newline in //
                    comment
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: doug at cs dot dartmouth dot edu
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: I can't guess what a "triplet" is


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


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