Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #396246

Re: VAX

From Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups comp.lang.c
Subject Re: VAX
Date 2026-01-06 21:14 -0800
Organization A noiseless patient Spider
Message-ID <86cy3mqa0n.fsf@linuxsc.com> (permalink)
References (10 earlier) <20250804121938.0000122a@yahoo.com> <2025Aug4.140932@mips.complang.tuwien.ac.at> <2025Aug4.165141@mips.complang.tuwien.ac.at> <20250804182839.00000600@yahoo.com> <87sei7do4g.fsf@example.invalid>

Show all headers | View raw


Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Michael S <already5chosen@yahoo.com> writes:
>
>> On Mon, 04 Aug 2025 12:09:32 GMT
>> anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
> [...]
>
>>> typedef ump unsigned _BitInt(65535);
>
> The correct syntax is :
>
> typedef unsigned _BitInt(65535) ump;
>
>>> ump sum3(ump a, ump b, ump c)
>>> {
>>>    return a+b+c;
>>> }
>
> [...]
>
>> 1.  Both gcc and clang happily* accept _BitInt() syntax even when
>> -std=c17 or lower.  Is not here a potential name clash for existing
>> sources that use _BitInt() as a name of the function?  I should think
>> more about it.
>
> In C17 and earlier, _BitInt is a reserved identifier.  Any attempt to
> use it has undefined behavior.  [...]

Not so.  The C standard says if a program declares or defines a
reserved identifier (in a context where it is reserved) then the
behavior is undefined.  The C standard does /not/ say that simply
using (as opposed to declaring or defining) a reserved identifier
has undefined behavior (in any context).

The C23 standard is different, but I believe what it says is
consistent with the previous paragraph.

Furthermore it is always possible to use any reserved identifier
in a way that has defined behavior, as for example:

  #include <stdio.h>

  #define XX(a) X(a)
  #define X(a) #a

  #define show(a) printf( "The id %s expands to %s\n", X(a), XX(a) )

  int
  main( int argc, char *argv[] ){
      show( _BitInt );
      return  0;
  }

This program works without complaint under all of C90, C99, C11, and
C17.

Back to comp.lang.c | Previous | NextPrevious in thread | Find similar


Thread

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