Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.arch,comp.lang.c Subject: Re: VAX Date: Mon, 04 Aug 2025 09:53:51 -0700 Organization: None to speak of Lines: 45 Message-ID: <87sei7do4g.fsf@example.invalid> References: <0c857b8347f07f3a0ca61c403d0a8711@www.novabbs.com> <2025Jul30.075918@mips.complang.tuwien.ac.at> <2025Aug1.191648@mips.complang.tuwien.ac.at> <106jvc3$qan0$1@dont-email.me> <106kh0k$18ipb$1@paganini.bofh.team> <2025Aug3.185110@mips.complang.tuwien.ac.at> <106otf6$1sov2$1@dont-email.me> <106p4k6$1u13o$1@dont-email.me> <20250804121938.0000122a@yahoo.com> <2025Aug4.140932@mips.complang.tuwien.ac.at> <2025Aug4.165141@mips.complang.tuwien.ac.at> <20250804182839.00000600@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Mon, 04 Aug 2025 16:53:55 +0000 (UTC) Injection-Info: dont-email.me; posting-host="082955b497aea4dd0c1615617f2709c3"; logging-data="2392989"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Rvn0heQ5VV1M0odNF8h9H" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:JI+LMXeTkSh1vPxXD57uCsbuhKE= sha1:VBqYATadrTwAC8DgjdRwsbUc0qI= Xref: csiph.com comp.arch:112882 comp.lang.c:394015 Michael S 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. That's exactly why new keywords are often defined with that ugly syntax. Both gcc and clang warn about _BitInt with invoked with "-std=c17 -pedantic". [...] > * - the only sign of less than perfect happiness is a warning produced > with -pedantic flag. Yes, both are behaving reasonably. If you don't use "-pedantic", you're telling the compiler you don't want standard conformance. (I'd be happier if conformance were the default, but we're stuck with it.) But accepting _BitInt in pre-C23 mode is conforming. > Cross-posted to c.lang.c I've kept the cross-post to comp.lang.c and comp.arch. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */