Liste des Groupes | Revenir à l c |
On Tue, 8 Apr 2025 16:47:07 +0100There was a stipulation for an 8-bit 'char' type, but it got lost. Maybe I deleted it and intended to have it as a note later on.
bart <bc@freeuk.com> wrote:
On 08/04/2025 15:57, David Brown wrote:I don't think that 'No' above is correct.On 08/04/2025 15:32, bart wrote:>On 05/04/2025 18:56, Philipp Klaus Krause wrote:>Am 02.04.25 um 11:57 schrieb bart:>* Where are the fixed-width types from stdint.h?>
Same as for size_t, etc: They don't exist. Those are not separate
types, just typedefs to some other types. E.g. uint16_t could be
typedef'ed to unsigned int.
This is the point I made a few weeks back, but others insisted
they were part of C:
>
>
Me:
>> stdint.h et al are just ungainly bolt-ons, not fully supported
by the >> language.
>
Keith Thompson:
> No, they're fully supported by the language. They've been in
the ISO > standard since 1999.
>
>
This is an exchange posted on 20-Mar-2025 at 19:10 GMT (header
shows 'Thu, 20 Mar 2025 12:10:22 -0700')
>
Clearly, they're not quite as fully supported as short, int etc;
they are usually just aliases. But that needn't stop them being
shown on such a chart.
Standard aliases are part of the language standard, and therefore
standard and fully supported parts of the language.
So, should they have been on that chart?
>
> and fully supported parts of the language.
>
Differences between 'unsigned long long int' and 'uint64_t' up to C23:
>
uint64_t unsigned long long int
>
Works without header No Yes
>
Literal suffix No Yes (ULL etc)
>
Dedicated printf format No Yes (%llu)
>
Dedicated scanf format No Yes (whatever that might be)
>
sizeof() might not be 8 No Maybe
Take, for example, ADI SHARC DSPs. Traditionally, sizeof(uint64_t) was
2.
I looked into the latest manual and see that now their compiler have
an option -char-size-8 and with this option sizeof(uint64_t)=8. But
this option is available only for those members of SHARC family that
have HW support for byte addressing. Even for those, -char-size-8 is
not a default.
That last one was an oversight which I only spotted after posting (in Reddit you can edit your posts!).>I don't understand why you say 'No'. AFAIK, on all existing systems
Reserved word[1] No Yes
>
Outside lexical scope[2] No Yes
>
Incompatible with
unsigned long int No Yes
>
except 64-bit Unixen the answer is 'Yes'.
Les messages affichés proviennent d'usenet.