Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: relearning C: why does an in-place change to a char* segfault? Date: Tue, 13 Aug 2024 18:44:18 -0700 Organization: None to speak of Lines: 21 Message-ID: <87o75vg9ot.fsf@nosuchdomain.example.com> References: <87jzh0gdru.fsf@nosuchdomain.example.com> <20240801174256.890@kylheku.com> <864j7oszhu.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Wed, 14 Aug 2024 03:44:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8fd33d9227c54bb33f07e63da240e3d2"; logging-data="294359"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RHDs8U0ljVTAQHt0/tYQW" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:0R7uoII4mCf0n5SJik0E8CMlC8g= sha1:yfXS97WVmhK/imCHXU2zVxKmfLA= Xref: csiph.com comp.lang.c:387558 Tim Rentsch writes: > James Kuyper writes: > >> Just as 1 is an integer literal whose value cannot be modified, >> [...] > > The C language doesn't have integer literals. C has string > literals, and compound literals, and it has integer constants. > But C does not have integer literals. Technically correct (but IMHO not really worth worrying about). There is a proposal for C2y, authored by Jens Gustedt, to change the term "constant" to "literal" for character, integer, and floating constants. (I think it's a good idea.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */