preprocessor/10513: Annoying warning
csimon@epeios.org
csimon@epeios.org
Sun Apr 27 20:03:00 GMT 2003
>Number: 10513
>Category: preprocessor
>Synopsis: Annoying warning
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 27 14:46:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: SIMON Claude
>Release: gcc version 3.2 20020927 (prerelease)
>Organization:
>Environment:
Cygwin or GNU/Linux
>Description:
When compiling the below source file ('g++ dummy.cpp'), I obtain this message :
---
dummy.cpp:9:14: warning: pasting "::" and "i" does not give a valid preprocessing token
---
This happend with all gcc 3.x releases. It doesn't happend with the gcc releases prior to 3.x, and other compilers (Borland C++, Visual C++, Metrowerks CodeWarrior) don't issue this warning.
I'm not really sure if this is a bug, but, if not, can you say me what's wrong ?
Thanks !
--- Begin of dummy.cpp source file ---
namespace n {
int i;
}
#define M(a) a##i
int main( void )
{
M(n::) = 42; // The line which produces the preprocessor warning.
return 0;
}
--- End of dummy.cpp source file ---
>How-To-Repeat:
g++ dummy.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list