User account creation filtered due to spam.
__extension__ applies to use of the "long long" type but not
to long long constants. So in --ansi --pedantic
__extension__ long long n = __extension__ 3ll;
warns about the constant.
The intention behind the use of __extension__ in <stdint.h> is
clearly to provide 64-bit types in such a way that diagnostics are
not provoked by defining them in terms of 'long long'. However,
use of INT64_C does provoke a diagnostic, which is unreasonable
(the user is not supposed to care how INT64_C is implemented).
This could be avoided if __extension__ applied to ll constants.
But C89 doesn't have <stdint.h> and INT64_C.
Right, use of it in C89 is an extension. That's the whole point,
and is why __extension__ is used in it. But it only works for the
types, not the constants.
Someone clearly thinks "long long" should be available in C89
--ansi --pedantic, via __extension. So the long long constant
syntax should also be available via __extension, to be consistent.
Subject: Re: New: __extension__ should apply to long long
On Thu, 7 Oct 2004, algrant at acm dot org wrote:
> __extension__ applies to use of the "long long" type but not
> to long long constants. So in --ansi --pedantic
> __extension__ long long n = __extension__ 3ll;
> warns about the constant.
Much the same applies to the macro I in <complex.h>, and an alternative
possible solution would be not to warn if such constants arise from the
expansion of macros in system headers. In any case, this is already
reported as bug 7263.
*** This bug has been marked as a duplicate of 7263 ***