This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][libcpp] Macros for unique named functions / identifiers
You didn't look too well:
http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html#Common-Predefined-Macros
On 14 April 2010 11:58, Dave Edwards <dave@icerasemi.com> wrote:
>
> I couldn't find any reference to __COUNTER__ in the GCC manual so didn't
> know it existed.
>
> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: 14 April 2010 10:45
> To: Dave Edwards
> Cc: tromey@redhat.com; Rahul Kharche; GCC Patches; sdkteam-gnu
> Subject: Re: [PATCH][libcpp] Macros for unique named functions /
> identifiers
>
> 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
> of
>> the compiler, and thus we'd not get unique names.
>
> But you would join that with __COUNTER__, not __LINE__.
>
> Paolo
>