preprocessor/8782: concatenating in macro produces strange warnings

ctron@dentrassi.de ctron@dentrassi.de
Mon Dec 2 02:46:00 GMT 2002


>Number:         8782
>Category:       preprocessor
>Synopsis:       concatenating in macro produces strange warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 02 02:46:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     ctron@dentrassi.de
>Release:        3.2
>Organization:
>Environment:

>Description:
when using the code from "how-to-repeat" the following macro is emitted. The compilation works, but the warning is anoying.

warning: pasting "::" and "ostream" does not give a valid preprocessing token
>How-To-Repeat:
use the following statements:

#define MACRO(x) std:: ## x

or

#define MACRO(x) std::##x

the warning will be generated altough it works afterwards.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list