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 preprocessor/47328] New: preprocessor handles backslash at the end of a line incorrectly


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

           Summary: preprocessor handles backslash at the end of a line
                    incorrectly
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gccbugzilla@trash-mail.com


I use the gcc preprocessor to process structures like

@ define vunpack_uchar4(OUT,IN) {               \
    uint _in = (uint)(IN);                      \
    OUT.x = (_in >>  0) & 0xFF;                 \
    OUT.y = (_in >>  8) & 0xFF;                 \
    OUT.z = (_in >> 16) & 0xFF;                 \
    OUT.w = (_in >> 24) & 0xFF;                 \
  }

(the @ is not a typo but intended. this should not be handled like macro
definition)

The backslash at the end of the line was handled correctly up to gcc 4.5.0. Now
the backslash is removed, but the lines are _not_ concatenated.


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