Meaning of __BASE_FILE__ inside -include file?

Gary Funck gary@intrepid.com
Thu Oct 14 01:42:00 GMT 2004



> -----Original Message-----
> From: Zack Weinberg [mailto:zack@codesourcery.com]
> Sent: Wednesday, October 13, 2004 3:46 PM
[...]
> 
> Could you clarify whether you are actually seeing __BASE_FILE__ expand
> to a non-string-constant, and then file a bug in GCC Bugzilla?

Sorry for the conclusion. There's no problem with __BASE_FILE__ being
a string constant. Here's a simple example:

% cat > t.h
char *s = __BASE_FILE__;

% gcc -x c -E -include t.h /dev/null
# 1 "/dev/null"
# 1 "<built-in>"
# 1 "<command line>"
# 10 "<command line>"
# 1 "t.h" 1
char *s = "<command line>";



More information about the Gcc mailing list