This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/12743] New: Multi-line strings not diagnosed when occurring in a macro call
- From: "gabor dot greif at lucent dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2003 13:58:09 -0000
- Subject: [Bug preprocessor/12743] New: Multi-line strings not diagnosed when occurring in a macro call
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.