[Bug preprocessor/12743] New: Multi-line strings not diagnosed when occurring in a macro call
gabor dot greif at lucent dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 23 14:18:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list