This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25170] New: Erroneous error message for simple macro
- From: "jw203198 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Nov 2005 01:16:35 -0000
- Subject: [Bug c/25170] New: Erroneous error message for simple macro
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Here is the test code:
typedef struct
{
int ele;
} tstruct;
#define TST(r,t) r##t = 1
void test()
{
tstruct ts;
TST(ts,.ele);
}
It generates the error:
"error: pasting "ts" and "." does not give a valid preprocessing token"
In previous versions of compiler (eg gcc-3.2.2) this generated a warning and
could therefore be ignored as another piece of unhelpful compiler output. But
now it is a error (but it isn't!) which stops compilation.
--
Summary: Erroneous error message for simple macro
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jw203198 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25170