This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] stdint: Use __extension__ on long long constants
* Dennis Lambe, Jr.:
> Quoting Andreas Schwab <schwab@suse.de>:
>
>> On Feb 25 2020, Dennis Lambe Jr. wrote:
>>> +# define __UINT64_C(c) (__extension__ c ## ULL)
>>
>> The expansion must be a preprocessor expression.
>
> Oof, yeah, I see what you mean. GCC recognizes the __extension__
> keyword at compile-time, but GCC's preprocessor doesn't recognize it
> and throws an error. This seems like a bug in GCC to me, and I don't
> know how to work around it to accomplish what I'm trying to do with
> this patch. Withdrawn until I can figure it out, unless someone else
> has an idea.
The usual trick is to write (__extension__ + c ## ULL), but this
produces a -Wundef warning even in !C89 modes, so I think we'd be off
worse with that.
Thanks,
Florian