Path: csiph.com!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Baby X resource compiler nearly ready
Date: Tue, 08 Aug 2023 06:03:03 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <86edkdbsag.fsf@linuxsc.com>
References: <1c2d0b65-3e37-4534-966f-d039a655773cn@googlegroups.com> <644ac909-d6b9-42b9-88c0-1442b6fd227an@googlegroups.com> <87wmy9rwi8.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="996336b78d58b8cbe9ae682ecb3e6882"; logging-data="3580797"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xnWbrolA99tdx3Hu2a5ahbIyEcHibdzU="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:K7Doku8llowf9Iv+ePvcPiySaxE= sha1:zUBUjcfwOoEdI6mfLxVvyLrxGho=
Xref: csiph.com comp.lang.c:171823
Spiros Bousbouras writes:
> On Sun, 6 Aug 2023 04:36:47 -0700 (PDT)
> Malcolm McLean wrote:
>> #ifndef __int8_t_defined
>> #define __int8_t_defined
>> typedef unsigned char uint8_t;
>> typedef signed char int8_t;
>> typedef unsigned short uint16_t;
>> typedef signed short int16_t;
>> typedef unsigned int uint32_t;
>> typedef signed int int32_t;
>> #ifdef _MSC_VER
>> typedef unsigned __int64 uint64_t;
>> typedef signed __int64 int64_t;
>> #else
>> typedef unsigned long long uint64_t;
>> typedef signed long long int64_t;
>> #endif
>> #endif
> [...] the code above has undefined behaviour because it uses
> reserved identifiers. [...]
This code does have undefined behavior, but only because it
/defines/ a reserved identifier. Simply /using/ a reserved
identifier is not undefined behavior, only declaring or
defining one.