Subject: Re: pcc?
To: None <>
From: Joerg Sonnenberger <>
List: tech-userlevel
Date: 12/30/2007 11:49:03
On Sun, Dec 30, 2007 at 01:03:32AM -0500, der Mouse wrote:
> > __FUNCTION__ is expanded as string by the preprocessor and merges
> > with other strings.
> Are you sure about that?  The preprocessor contains enough of a
> codewalker to know whether it's in a function, and which function if
> so?  I thought __LINE__ and __FILE__ were done by the preprocessor but
> __FUNCTION__ was compile-phase magic.  Certainly the gcc version whose
> docs I have most readily at hand, while rather old, does say that

Well, it effectively behaves as string *literal*. That's what GCC did
for a long time, but they might have changed it. I haven't checked if it
is expanded by the preprocessor or in the parser of the compile phase,
but it still behaved like a string literal.