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/12743] New: Multi-line strings not diagnosed when occurring in a macro call


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Multi-line strings not diagnosed when occurring in a
                    macro call
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gabor dot greif at lucent dot com
                CC: gcc-bugs at gcc dot gnu dot org

Compile this snippet:

----------------------
#define FOO(X) wagga X
    FOO(("kkkk
llll"));
----------------------

In gcc-3.4 I get these errors:

foo.C:100:1: unterminated argument list invoking macro "FOO"
foo.C:2: error: `FOO' undeclared (first use this function)
foo.C:2: error: (Each undeclared identifier is reported only once for each
function it appears in.)
foo.C:2: error: expected `;'
foo.C:2: error: expected `}'

Especially the first one is annoying, as it directs me to
the end of the file (which is usually far away :-)

In non-macro context multiline strings are correctly noted as an error.


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