Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Are there any conformant C compilers? Date: Fri, 02 Sep 2022 20:42:07 -0700 Organization: None to speak of Lines: 26 Message-ID: <87wnalkttc.fsf@nosuchdomain.example.com> References: <90aaf37e-e48d-40c4-ad98-bf34533af2ben@googlegroups.com> <871qswsdn2.fsf@bsb.me.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader01.eternal-september.org; posting-host="bfa3159622d8695b1dca10d6764500ef"; logging-data="2941648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0LVLGLgIMc6SIj+zpDBpt" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:FMEmnVUkyqCLVOhnosw4ouEcBgw= sha1:t0vDFzD7ECyGIIeGWxj+h2QjgK8= Xref: csiph.com comp.lang.c:167451 antispam@math.uni.wroc.pl writes: [...] > #include > int main(void) { > register const int abc = 123; > *(int*)&abc = 999; > printf("abc = %d\n", abc); > return 0; > } > > gcc still only produces a warning, but you get warning without > any extra options. That's odd, I get a fatal error by default with gcc 8.3.0 and 11.2.0. c.c: In function ‘main’: c.c:4:5: error: address of register variable ‘abc’ requested 4 | *(int*)&abc = 999; | ^ [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */