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

jerry_williams at candle dot com gcc-bugzilla@gcc.gnu.org
Sun Oct 5 02:09: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

           Summary: macro past '##' behaving differently that prev. and
                    other C/C++ compilers
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jerry_williams at candle dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: lnx  SuSe 7.1  Intel
  GCC host triplet: lnx  Suse 7.1  Intel
GCC target triplet: lnx  SuSe 7.1  Intel

The following source process macro past correctly, but yields error msg and
non-sero return, supresses object and link. 
foo.c =:
#define __STRINGIZE(_STR_) #_STR_
#define _STRINGIZE(_STR_) __STRINGIZE(_STR_)
#define _SOURCE_(_1_) _1_##.h
#define -SOURCEPATH(_1_) _STRINGIZE(dir/##_1)
#include _SOURCPATH(lib/_SOURCE_(foo)
at dir/lib/ is foo.h =:  (hello world)
#include <stdio.h>
int main()
{
 printf("hello, world\n");
 return(0);
}
GCC verion:  3.3.1
gcc build options default (none)
gcc command line: gcc -save-temps foo.c
command output:
foo.c:9:40: pasting "/" and :lib" does not give a valid preprocessing token
foc.c:9:40: pasting "foo" and "." does not give a valid preprocessing token



More information about the Gcc-bugs mailing list