This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][libcpp] Macros for unique named functions / identifiers


On 14/04/2010 11:30, Dave Edwards wrote:
> Thanks for your help!
> 
> We got confused as the source of the cpp manual is in the gcc/doc
> directory, so  assumed it would have been present in the GCC manual. Doh!
> 
> I reckon just a reference in gcc.pdf's "3.11 Options Controlling the
> Preprocessor" to the fact there is a separate cpp manual would probably do
> the trick.
> 
> Our problem with __LINE__ was that it wasn't unique across included files,
> but it sounds like __COUNTER__ would do indeed do the trick, and thus could
> remove the need for __CANON_BASE_FILE__ and __CANON_BASE_LINE__.

  I'm having deja vú bigtime in this thread :) I suggested the same kind of
identifier-safe filename macro a couple of years ago, just at the same time as
__COUNTER__ was being proposed, and we came to the same conclusion for the
same reason!

http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01404.html


    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]