Deutsch English Français Italiano |
<v9if6v$fs3n$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: James Kuyper <jameskuyper@alumni.caltech.edu> Newsgroups: comp.lang.c Subject: Re: relearning C: why does an in-place change to a char* segfault? Date: Wed, 14 Aug 2024 10:33:03 -0400 Organization: A noiseless patient Spider Lines: 15 Message-ID: <v9if6v$fs3n$1@dont-email.me> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 14 Aug 2024 16:33:04 +0200 (CEST) Injection-Info: dont-email.me; posting-host="2c3e2d0509e709530803252969af558f"; logging-data="520311"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189V3ewlYEJ0Qp8QwobQZGKs3SLVrKJ75s=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:T+ME3nQ4WStOWA70fn0ZzKhN+BE= Content-Language: en-US In-Reply-To: <864j7oszhu.fsf@linuxsc.com> Bytes: 2000 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. True, but C++ does, and it means the same thing by "integer literal" that C means by "integer constant". C doesn't define the term "integer literal" with any conflicting meaning, and my use of the C++ terminology allowed me to make the parallel with string literals clearer, so I don't see any particular problem with my choice of words.