public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/3858: fails to parse #include HASHDEFINEDMACROFORPATH"filename"
@ 2001-07-28 14:23 neil
0 siblings, 0 replies; 2+ messages in thread
From: neil @ 2001-07-28 14:23 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, vil
Synopsis: fails to parse #include HASHDEFINEDMACROFORPATH"filename"
State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Sat Jul 28 14:23:04 2001
State-Changed-Why:
Not a bug. String concatenation occurs in the compiler after the standard preprocessing stages. In other words, the preprocessor does not do string
concatenation.
2.95.2 doing so could be construed as a bug or an undocumented feature.
The evolution of GCC classifies it as a bug :-) It is certainly not portable.
As for no such file or directory, here it means "no such file" of course,
but that's Unix for you. Like CPP claimed, it ignored your final string
as an excess token, and tried to open the directory as a file.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3858&database=gcc
^ permalink raw reply [flat|nested] 2+ messages in thread
* preprocessor/3858: fails to parse #include HASHDEFINEDMACROFORPATH"filename"
@ 2001-07-28 11:06 vil
0 siblings, 0 replies; 2+ messages in thread
From: vil @ 2001-07-28 11:06 UTC (permalink / raw)
To: gcc-gnats
>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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-28 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-28 14:23 preprocessor/3858: fails to parse #include HASHDEFINEDMACROFORPATH"filename" neil
-- strict thread matches above, loose matches on Subject: below --
2001-07-28 11:06 vil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).