Subject: Re: pcc?
To: None <tech-userlevel@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-userlevel
Date: 12/30/2007 01:03:32
> __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

	These names [__FUNCTION__ and __PRETTY_FUNCTION__] are not
	macros: they are predefined string variables.  For example,
	@samp{#ifdef __FUNCTION__} does not have any special meaning
	inside a function, since the preprocessor does not do anything
	special with the identifier @code{__FUNCTION__}.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B