preprocessor/2219: Using "##" with macro varargs generates spurious warning

jelson@circlemud.org jelson@circlemud.org
Wed Mar 7 16:56:00 GMT 2001


>Number:         2219
>Category:       preprocessor
>Synopsis:       Using "##" with macro varargs generates spurious warning
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 07 16:56:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Elson
>Release:        gcc version 2.97 20001120 (experimental)
>Organization:
>Environment:
cross compiler for sh4-linux, host is i586 linux
>Description:
When using the "##" extension of variadic marcos, a spurious warning is generated.  The preprocessor appears to emit correct output, but the warning causes the compilation to fail when using -Werror.

The warning is of the form:

/tmp/prepbug.c:14:3: warning: pasting "(" and ""my debug message: %s"" does not give a valid preprocessing token

The attached file causes this error to be emitted.
>How-To-Repeat:
gcc -E prepbug.c
>Fix:
Unknown :-)
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list