This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/12513] macro past '##' behaving differently that prev. and other C/C++ compilers
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Oct 2003 02:18:28 -0000
- Subject: [Bug c/12513] macro past '##' behaving differently that prev. and other C/C++ compilers
- References: <20031005020938.12513.jerry_williams@candle.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12513
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
GCC host triplet|lnx Suse 7.1 Intel |lnxSuse 7.1 Intel
Resolution| |INVALID
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-05 02:18 -------
The error is correct according to the ISO/ANSI C and the ISO/ANSI C++ standards.
The way to correct the source is (removing the ##):
#define __STRINGIZE(_STR_) #_STR_
#define _STRINGIZE(_STR_) __STRINGIZE(_STR_)
#define _SOURCE_(_1_) _1_.h
#define _SOURCEPATH(_1_) _STRINGIZE(dir/_1_)
#include _SOURCEPATH(lib/_SOURCE_(foo))