preprocessor/3858: fails to parse #include HASHDEFINEDMACROFORPATH"filename"

vil@rccp.tsukuba.ac.jp vil@rccp.tsukuba.ac.jp
Sat Jul 28 11:06:00 GMT 2001


>Number:         3858
>Category:       preprocessor
>Synopsis:       fails to parse #include HASHDEFINEDMACROFORPATH"filename"
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 28 11:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     vil@rccp.tsukuba.ac.jp
>Release:        3.0
>Organization:
>Environment:
powerpc-ibm-aix4.3.2.0
>Description:
The following piece of code fails to compile under g++ 
or gcc

gcc yum.C

yum.C:
#define GPROGSPATH"/home/usr/me/"
#include GPROGSPATH"emptyfile.h"
int main(void){}

where /home/usr/me is my home directory,
and /home/usr/me/emptyfile.h really is an empty file.

At compile time it gives the following error.

yum.C:2:20: warning: extra tokens at end of #include directive
yum.C:2:33: /home/usr/me/: No such file or directory

The directory really does exist, as witnessed by the fact 
that the exact same code compiles fine on the same machine with
gcc emvironment rs6000-ibm-aix4.3.2.0 version 2.95
 
>How-To-Repeat:
cat>yum.C
#define GPROGSPATH"/home/usr/me/"
#include GPROGSPATH"emptyfile.h"
int main(void){}
ctrl-D
touch emptyfile.h
gcc yum.C
>Fix:

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



More information about the Gcc-bugs mailing list