public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* preprocessor/10513: Annoying warning
@ 2003-04-27 14:46 csimon
0 siblings, 0 replies; 2+ messages in thread
From: csimon @ 2003-04-27 14:46 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: preprocessor/10513: Annoying warning
@ 2003-04-27 15:11 nathan
0 siblings, 0 replies; 2+ messages in thread
From: nathan @ 2003-04-27 15:11 UTC (permalink / raw)
To: csimon, gcc-bugs, gcc-prs, nobody
Synopsis: Annoying warning
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sun Apr 27 15:11:32 2003
State-Changed-Why:
not a bug. the result of ## is undefined if it does not result
in a pp token. '::i' is not a pp token.
#define M(a) a i // this is fine
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10513
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-27 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-27 14:46 preprocessor/10513: Annoying warning csimon
2003-04-27 15:11 nathan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).