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/86079] New: preprocessor fails to splice lines


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86079

            Bug ID: 86079
           Summary: preprocessor fails to splice lines
           Product: gcc
           Version: 8.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbeulich at novell dot com
  Target Milestone: ---

While gcc 4.3 looks to still handle this correctly, at least all versions from
4.7 onwards (I don't have the intermediate versions readily available to check)
fail to splice lines where the first one ends in an escaped newline, at least
in the common case. Note the inconsistency with

unsigned \
int \\
u \\\
;

where the second and third lines are being spliced by "gcc -E", but none of the
others.

This is a clear violation of the standard's translation phase 2, making it
impossible to e.g. preprocess something like

https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/asm-x86/alternative-asm.h;h=0b6151634a01e9662ae4100dcaf3c0736885eb87;hb=refs/heads/staging

into code usable by the .s files produced by the compiler.

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