This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
preprocessor/3260: #include __FILE__ broken
- To: gcc-gnats at gcc dot gnu dot org
- Subject: preprocessor/3260: #include __FILE__ broken
- From: Andreas Schwab <schwab at suse dot de>
- Date: Tue, 19 Jun 2001 16:14:27 +0200
>Number: 3260
>Category: preprocessor
>Synopsis: #include __FILE__ broken
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Tue Jun 19 07:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 3.0 20010611 (prerelease)
>Organization:
>Environment:
System: Linux D65 2.4.4 #1 SMP Wed Jun 13 21:43:48 GMT 2001 ia64 unknown
Architecture: ia64
host: ia64-suse-linux-gnu
build: ia64-suse-linux-gnu
target: ia64-suse-linux-gnu
configured with: ../configure --enable-threads=posix --enable-long-long --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java --with-gxx-include-dir=/usr/include/g++ --enable-nls --with-slibdir=/lib --enable-shared ia64-suse-linux
>Description:
#include __FILE__ does not work.
>How-To-Repeat:
$ cat file.c
#define PASS 1
#if PASS == 1
#undef PASS
#define PASS 2
#include __FILE__
#undef PASS
#define PASS 3
#include __FILE__
#endif
PASS
$ gcc -E file.c
file.c:5:18: file.c__: No such file or directory
file.c:8:18: file.c__: Success
# 10 "file.c"
3
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: