Deutsch English Français Italiano |
<86ikw1o0h8.fsf@linuxsc.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch <tr.17687@z991.linuxsc.com> Newsgroups: comp.lang.c Subject: Re: relearning C: why does an in-place change to a char* segfault? Date: Thu, 15 Aug 2024 16:00:35 -0700 Organization: A noiseless patient Spider Lines: 27 Message-ID: <86ikw1o0h8.fsf@linuxsc.com> References: <IoGcndcJ1Zm83zb7nZ2dnZfqnPWdnZ2d@brightview.co.uk> <v8fhhl$232oi$1@dont-email.me> <v8fn2u$243nb$1@dont-email.me> <87jzh0gdru.fsf@nosuchdomain.example.com> <v8gte2$2ceis$2@dont-email.me> <20240801174256.890@kylheku.com> <v8i9o8$2oof8$1@dont-email.me> <v8j808$2us0r$1@dont-email.me> <864j7oszhu.fsf@linuxsc.com> <87o75vg9ot.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Fri, 16 Aug 2024 01:00:35 +0200 (CEST) Injection-Info: dont-email.me; posting-host="7281b2582241b74932977c55e2504530"; logging-data="1184676"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19g2EmGBr5iX7qWAYhcbnT8OdD4SlQ5rTQ=" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:LmvKIhqTErfib4+ouLKejhIwGfY= sha1:lzCMIdvnus6pq3wyRO6WSCmDeFY= Bytes: 2337 Keith Thompson <Keith.S.Thompson+u@gmail.com> writes: > Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > >> James Kuyper <jameskuyper@alumni.caltech.edu> 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). Anyone who flogs others posters for incorrectly using terminology defined in the ISO C standard should set a good example by using the ISO-C-defined terms correctly himself. > 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.) > > <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3239.htm> The more C is changed to resemble C++ the worse it becomes. It isn't surprising that you like it.