This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/53229] New: macro unwinder for preprocessing errors
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 11:42:03 +0000
- Subject: [Bug preprocessor/53229] New: macro unwinder for preprocessing errors
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53229
Bug #: 53229
Summary: macro unwinder for preprocessing errors
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
struct x {
int i;
};
struct x x;
#define TEST(X) x.##X
void foo (void)
{
TEST(i) = 0;
}
manuel@gcc12:~$ ~/trunk/187148M/build/gcc/cc1 test.c
foo
test.c: In function âfooâ:
test.c:10:1: error: pasting "." and "i" does not give a valid preprocessing
token
TEST(i) = 0;
^
manuel@gcc12:~$ clang test.c
test.c:10:3: error: pasting formed '.i', an invalid preprocessing token
TEST(i) = 0;
^
test.c:6:19: note: expanded from macro 'TEST'
#define TEST(X) x.##X
^
GCC should say:
test.c:6:19: error: pasting "." and "i" does not give a valid preprocessing
token (did you mean 'x.X'?)
#define TEST(X) x.##X
^
test.c:10:3: note: in expansion of macro 'TEST' requested here
TEST(i) = 0;
^