[Bug c/12513] macro past '##' behaving differently that prev. and other C/C++ compilers

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Oct 5 02:18:00 GMT 2003


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))



More information about the Gcc-bugs mailing list