Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #389924
| From | Keith Thompson <Keith.S.Thompson+u@gmail.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: So You Think You Can Const? |
| Date | 2025-01-09 03:21 -0800 |
| Organization | None to speak of |
| Message-ID | <878qrkqll8.fsf@nosuchdomain.example.com> (permalink) |
| References | <vljvh3$27msl$1@dont-email.me> <vlma9m$2s5e5$1@dont-email.me> <vlo0cm$2dkpd$9@dont-email.me> |
Julio Di Egidio <julio@diegidio.name> writes:
> On 08/01/2025 17:48, Andrey Tarasevich wrote:
[...]
>> It is perfectly safe. One can even argue that standard declaration
>> if `free` as `void free(void *)` is defective. It should have been
>> `void free(const void *)` from the very beginning.
>
> I do not understand that: `free` is changing the pointed data, so how
> can `const void *` even be "correct"?
No, `free` doesn't (necessarily) change the pointed-to data.
Any attempt to access the allocated data after free() has undefined
behavior, so it might be modified, but all free() needs to do is
make it available for further allocation. It might do so without
touching the data itself.
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-07 20:32 +0100
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-07 22:11 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-08 15:02 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-08 15:05 +0100
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-08 15:16 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-08 16:53 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-08 17:05 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-08 17:24 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-08 14:55 -0800
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-09 01:09 +0000
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-09 04:24 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-09 10:35 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-09 13:37 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:56 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-09 07:49 +0100
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-09 23:23 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-10 00:37 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-10 00:45 +0100
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-09 17:43 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-10 03:14 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-10 03:51 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-10 04:05 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-12 22:10 -0500
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-13 09:58 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-13 14:23 +0100
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-13 17:30 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-13 20:30 +0100
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-13 21:45 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-14 09:02 +0100
Re: So You Think You Can Const? bart <bc@freeuk.com> - 2025-01-14 12:44 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-14 14:50 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-14 13:06 -0500
Re: So You Think You Can Const? cross@spitfire.i.gajendra.net (Dan Cross) - 2025-01-14 18:53 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-14 20:31 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-14 17:20 -0500
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-14 21:15 -0500
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-15 09:29 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:35 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-14 14:05 -0800
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-14 14:29 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 02:48 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 02:51 +0100
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-15 03:12 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 04:19 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 04:30 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-14 12:46 -0500
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-14 12:38 -0800
Re: So You Think You Can Const? gazelle@shell.xmission.com (Kenny McCormack) - 2025-01-15 14:05 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 15:18 +0100
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-15 20:16 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:47 +0100
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-15 20:03 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:51 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:01 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:06 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:22 +0100
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 22:55 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:11 +0100
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-18 11:36 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-19 14:42 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-19 16:03 -0800
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-10 01:04 +0000
Re: So You Think You Can Const? antispam@fricas.org (Waldek Hebisch) - 2025-01-12 22:29 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-12 23:45 +0100
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-13 10:08 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-13 07:35 -0500
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-13 10:05 +0100
Re: So You Think You Can Const? Ar Rakin <rakinar2@onesoftnet.eu.org> - 2025-02-26 18:12 +0600
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:57 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:54 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:17 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-15 13:51 -0800
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-08 14:10 -0500
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-08 14:20 -0500
Re: So You Think You Can Const? scott@slp53.sl.home (Scott Lurndal) - 2025-01-08 20:14 +0000
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-08 12:12 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-09 08:12 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-08 14:48 -0800
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-09 01:04 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-09 07:56 +0100
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-08 12:43 -0800
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-09 00:49 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:15 +0100
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-08 09:46 +0100
Re: So You Think You Can Const? Ben Bacarisse <ben@bsb.me.uk> - 2025-01-08 11:25 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-08 13:25 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:53 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 14:46 +0100
What is wrong with malloc? (Was: So You Think You Can Const?) Julio Di Egidio <julio@diegidio.name> - 2025-01-08 15:42 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) David Brown <david.brown@hesbynett.no> - 2025-01-08 17:18 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Julio Di Egidio <julio@diegidio.name> - 2025-01-08 17:35 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) David Brown <david.brown@hesbynett.no> - 2025-01-08 19:39 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Phillip <nntp@fulltermprivacy.com> - 2025-01-08 11:45 -0500
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-08 11:52 -0800
Re: What is wrong with malloc? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 12:20 -0800
Re: What is wrong with malloc? Phillip <nntp@fulltermprivacy.com> - 2025-01-08 15:27 -0500
Re: What is wrong with malloc? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 13:41 -0800
Re: What is wrong with malloc? Phillip <nntp@fulltermprivacy.com> - 2025-01-09 00:09 -0500
Re: What is wrong with malloc? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 21:34 -0800
Re: What is wrong with malloc? Phillip <nntp@fulltermprivacy.com> - 2025-01-09 10:30 -0500
Re: What is wrong with malloc? Michael S <already5chosen@yahoo.com> - 2025-01-09 18:12 +0200
Re: What is wrong with malloc? Phillip <nntp@fulltermprivacy.com> - 2025-01-09 12:40 -0500
Re: What is wrong with malloc? David Brown <david.brown@hesbynett.no> - 2025-01-09 14:53 +0100
Re: What is wrong with malloc? Michael S <already5chosen@yahoo.com> - 2025-01-09 17:27 +0200
Re: What is wrong with malloc? (Was: So You Think You Can Const?) David Brown <david.brown@hesbynett.no> - 2025-01-09 13:15 +0100
Re: What is wrong with malloc? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 14:12 -0800
Re: What is wrong with malloc? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-08 15:00 -0800
Re: What is wrong with malloc? David Brown <david.brown@hesbynett.no> - 2025-01-09 14:58 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Julio Di Egidio <julio@diegidio.name> - 2025-01-09 09:07 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Julio Di Egidio <julio@diegidio.name> - 2025-01-09 10:07 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) David Brown <david.brown@hesbynett.no> - 2025-01-09 15:11 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) bart <bc@freeuk.com> - 2025-01-09 15:28 +0000
Re: What is wrong with malloc? (Was: So You Think You Can Const?) David Brown <david.brown@hesbynett.no> - 2025-01-09 21:39 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) Julio Di Egidio <julio@diegidio.name> - 2025-01-10 15:30 +0100
Re: What is wrong with malloc? (Was: So You Think You Can Const?) James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-08 14:10 -0500
Re: What is wrong with malloc? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 12:25 -0800
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-08 16:24 +0000
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 12:08 -0800
Re: So You Think You Can Const? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2025-01-08 08:48 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-08 12:24 -0800
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-08 13:01 -0800
Or it could be that... (Was: So You Think You Can Const?) gazelle@shell.xmission.com (Kenny McCormack) - 2025-01-08 21:32 +0000
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-09 09:12 +0100
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-09 03:21 -0800
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-09 12:26 +0100
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-09 19:47 +0000
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-09 17:48 -0800
Re: So You Think You Can Const? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2025-01-09 22:01 -0800
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-09 23:40 -0800
Re: So You Think You Can Const? Michael S <already5chosen@yahoo.com> - 2025-01-10 12:23 +0200
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-10 08:50 -0500
Re: So You Think You Can Const? Michael S <already5chosen@yahoo.com> - 2025-01-12 13:07 +0200
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-12 03:22 -0800
Re: So You Think You Can Const? Richard Harnden <richard.nospam@gmail.invalid> - 2025-01-12 16:54 +0000
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 23:10 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 23:31 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-13 11:55 -0800
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-10 10:37 -0800
Re: So You Think You Can Const? scott@slp53.sl.home (Scott Lurndal) - 2025-01-10 18:58 +0000
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-10 11:08 -0800
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-10 19:11 +0000
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-10 20:58 -0500
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-13 11:46 -0800
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-13 16:11 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-03-22 09:26 -0700
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-10 20:57 -0800
Re: So You Think You Can Const? Richard Damon <richard@damon-family.org> - 2025-01-11 09:16 -0500
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-11 18:23 -0800
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-10 18:37 +0000
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-10 11:08 -0800
Re: So You Think You Can Const? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2025-01-11 08:38 -0800
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-12 02:29 +0000
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-11 20:03 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 18:26 -0800
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 22:38 -0800
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-09 15:18 +0100
Re: So You Think You Can Const? Andrey Tarasevich <andreytarasevich@hotmail.com> - 2025-01-09 22:04 -0800
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-10 11:31 +0100
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-10 10:56 -0800
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-11 12:14 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-11 17:07 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-11 17:21 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-11 17:33 +0100
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-11 19:29 -0500
Re: So You Think You Can Const? Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2025-01-11 14:50 -0800
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-11 18:32 -0800
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-11 19:29 -0500
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-12 16:25 -0800
Re: So You Think You Can Const? James Kuyper <jameskuyper@alumni.caltech.edu> - 2025-01-11 10:58 -0500
Re: So You Think You Can Const? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-01-10 19:28 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-12 14:57 +0100
Re: So You Think You Can Const? Tim Rentsch <tr.17687@z991.linuxsc.com> - 2025-01-08 11:44 -0800
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-12 16:46 -0800
Re: So You Think You Can Const? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-15 02:09 +0000
Re: So You Think You Can Const? David Brown <david.brown@hesbynett.no> - 2025-01-15 09:39 +0100
Re: So You Think You Can Const? Julio Di Egidio <julio@diegidio.name> - 2025-01-15 13:52 +0100
Re: So You Think You Can Const? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-01-15 13:46 -0800
Re: So You Think You Can Const? Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-01-26 06:32 +0000
csiph-web