This is the mail archive of the
mailing list for the GCC project.
RE: [PATCH][libcpp] Macros for unique named functions / identifiers
I couldn't find any reference to __COUNTER__ in the GCC manual so didn't
know it existed.
From: Paolo Bonzini [mailto:firstname.lastname@example.org] On Behalf Of Paolo
Sent: 14 April 2010 10:45
To: Dave Edwards
Cc: email@example.com; Rahul Kharche; GCC Patches; sdkteam-gnu
Subject: Re: [PATCH][libcpp] Macros for unique named functions /
On 04/14/2010 11:38 AM, Dave Edwards wrote:
> This wouldn't work - CANON_BASE_FILE is*different* for each included
> file. With this approach we'd get the same string for each invokation
> the compiler, and thus we'd not get unique names.
But you would join that with __COUNTER__, not __LINE__.