Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #394021
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.arch, comp.lang.c |
| Subject | Re: VAX |
| Date | 2025-08-04 22:21 -0700 |
| Organization | None to speak of |
| Message-ID | <87ldny7397.fsf@example.invalid> (permalink) |
| References | (13 earlier) <20250804182839.00000600@yahoo.com> <87sei7do4g.fsf@example.invalid> <20250804220315.00007240@yahoo.com> <6859dc0d-f3b5-481b-8ffb-b4c0a722412e@alumni.caltech.edu> <20250804224049.00006937@yahoo.com> |
Cross-posted to 2 groups.
Michael S <already5chosen@yahoo.com> writes:
> On Mon, 4 Aug 2025 15:25:54 -0400
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>> On 2025-08-04 15:03, Michael S wrote:
>> > On Mon, 04 Aug 2025 09:53:51 -0700
>> > Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> ...
>> >> In C17 and earlier, _BitInt is a reserved identifier. Any attempt
>> >> to use it has undefined behavior. That's exactly why new keywords
>> >> are often defined with that ugly syntax.
>> >>
>> >
>> > That is language lawyer's type of reasoning. Normally gcc
>> > maintainers are wiser than that because, well, by chance gcc
>> > happens to be widely used production compiler. I don't know why
>> > this time they had chosen less conservative road.
>>
>> If _BitInt is accepted by older versions of gcc, that means it was
>> supported as a fully-conforming extension to C. Allowing
>> implementations to support extensions in a fully-conforming manner is
>> one of the main purposes for which the standard reserves identifiers.
>> If you thought that gcc was too conservative to support extensions,
>> you must be thinking of the wrong organization.
>>
>
> I know that gcc supports extensions.
> I also know that gcc didn't support *this particular extension* up
> until quite recently. I would guess, up until this calendar year.
> Introducing new extension without way to disable it is different from
> supporting gradually introduced extensions, typically with names that
> start by double underscore and often starting with __builtin.
>
> BTW, I still didn't think deeply about it and still hope that outside
> of C23 mode gcc somehow cared to make name clash unlikely.
Using the keyword _BitInt makes name clashes nearly impossible.
In C23, it's a new keyword. In pre-C23, it's an
implementation-defined keyword that will not clash with any
identifier that any portable code will use, or that any non-portable
code is at all likely to use for anything other than its new
standard meaning.
Breaking existing code that uses "_BitInt" as an identifier is
a non-issue. There very probably is no such code.
The feature can be disabled by not using "_BitInt" in your code,
or by using the "-pedantic-errors" option with a standard earlier
than C23.
I'm not sure how much more conservative gcc could have been.
(Likewise for clang.)
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 18:28 +0300
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-04 09:53 -0700
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 22:03 +0300
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-04 15:25 -0400
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-04 22:40 +0300
Re: VAX "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-08-04 12:44 -0700
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-04 22:21 -0700
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:25 +0000
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-05 19:14 -0700
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-06 04:31 +0000
Re: VAX Michael S <already5chosen@yahoo.com> - 2025-08-06 11:48 +0300
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-06 11:56 -0400
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-12-15 11:51 -0800
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:13 +0000
Re: VAX James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-08-06 11:54 -0400
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-06 13:58 -0700
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-06 21:33 -0800
Re: VAX Kaz Kylheku <643-408-1753@kylheku.com> - 2025-08-05 21:08 +0000
Re: VAX Jakob Bohm <egenagwemdimtapsar@jbohm.dk> - 2025-08-17 20:18 +0200
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-17 22:18 -0700
Re: VAX Richard Heathfield <rjh@cpax.org.uk> - 2025-08-18 08:02 +0100
Re: VAX David Brown <david.brown@hesbynett.no> - 2025-08-18 11:34 +0200
Re: VAX Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-08-18 21:57 -0700
Re: VAX Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-06 21:14 -0800
csiph-web