Groups | Search | Server Info | Login | Register
Groups > comp.lang.c > #396290
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Tim Rentsch <tr.17687@z991.linuxsc.com> |
| Newsgroups | comp.lang.c |
| Subject | Re: function pointer question |
| Date | Wed, 07 Jan 2026 18:27:02 -0800 |
| Organization | A noiseless patient Spider |
| Lines | 51 |
| Message-ID | <86pl7kon49.fsf@linuxsc.com> (permalink) |
| References | <10j7rs6$7c9e$1@dont-email.me> <20260102091518.226@kylheku.com> <10j96mn$jrsp$1@dont-email.me> <10j9enb$p6ts$2@dont-email.me> <10j9g71$pr9o$1@dont-email.me> <10jb3j5$17gcb$3@dont-email.me> <10jbsp0$1gf7e$1@dont-email.me> <10jc02j$1hk1n$1@dont-email.me> <86bjj5phai.fsf@linuxsc.com> <10jm0ul$oq53$1@dont-email.me> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Injection-Date | Thu, 08 Jan 2026 02:27:12 +0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="f646824e109d26d154da12d2f3c25277"; logging-data="1245349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XW5susszUhhAwfV+E+ktpkNzliOQYZ08=" |
| User-Agent | Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) |
| Cancel-Lock | sha1:zDYHicEGkEiFCDdAJlUSmE/zZXc= sha1:lmhgL9n5srtoht4d+pcQGKTvU6Q= |
| Xref | csiph.com comp.lang.c:396290 |
Show key headers only | View raw
Andrey Tarasevich <noone@noone.net> writes:
> On Wed 1/7/2026 7:35 AM, Tim Rentsch wrote:
>
>> Andrey Tarasevich <noone@noone.net> writes:
>>
>>> On Sat 1/3/2026 12:04 PM, Chris M. Thomasson wrote:
>>>
>>>> struct object_prv_vtable {
>>>> int (*fp_destroy) (void* const);
>>>> };
>>>
>>> And interesting piece of trivia about C function types and function
>>> type compatibility rules is that:
>>>
>>> 1. Top-level qualifiers on function parameters are preserved as part
>>> of function type.
>>
>> Not completely wrong but not exactly right either.
>>
>>> However, such top-level qualifiers are ignored when
>>> determining function type compatibility.
>>
>> It's easier to take the point of view that top-level qualifiers
>> for function parameters don't participate in the type of the
>> function as a whole. Taking that view is easier to understand
>> and gives results that are indistinguishable from the actual
>> rules.
>
> No, that's not entirely accurate.
>
> The C17 modifications I mentioned in my previous post stems from DR#423
>
> https://www.open-std.org/jtc1/sc22/wg14/www/docs/summary.htm#dr_423
>
> which is related to how qualifications are treated under
> _Generic`. `_Generic` operates on "exact match" basis not on "type
> compatibility" basis. Which is why such matters suddenly become
> important.
>
> The DR itself is about qualifications on rvalues (another thing that
> "did not matter" previously), not about function parameters. But it is
> clear that it applies to our topic as well.
>
> I have no time to research it further at the moment (will do it a bit
> later), but something tells me that `_Generic` is expected to "see"
> and distinguish the exact const-qualification of function parameters
> in function types. If so, it might be a "useless" feature, but still..
I see you have posted a further followup. I am responding to
that.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar
function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 07:24 +0000
Re: function pointer question Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-02 09:04 +0000
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 14:42 +0000
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 14:45 +0000
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-02 02:52 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 14:43 +0000
Re: function pointer question highcrew <high.crew3868@fastmail.com> - 2026-01-02 17:21 +0100
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-02 09:37 -0800
Re: function pointer question Ben Bacarisse <ben@bsb.me.uk> - 2026-01-03 03:33 +0000
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-03 07:41 -0800
Re: function pointer question Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-03 21:46 +0000
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-04 12:03 +0100
Re: function pointer question Kaz Kylheku <046-301-5902@kylheku.com> - 2026-01-06 20:41 +0000
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-07 07:18 -0800
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 21:52 -0800
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-08 09:17 +0100
Re: function pointer question Kaz Kylheku <046-301-5902@kylheku.com> - 2026-01-02 17:48 +0000
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 19:35 +0000
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-02 12:07 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-03 06:06 +0000
Re: function pointer question Kaz Kylheku <046-301-5902@kylheku.com> - 2026-01-02 21:50 +0000
Re: function pointer question Kaz Kylheku <046-301-5902@kylheku.com> - 2026-01-02 21:52 +0000
Re: function pointer question "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-01-02 14:18 -0800
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-03 13:55 +0100
Re: function pointer question "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-01-03 12:04 -0800
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-03 13:01 -0800
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 07:35 -0800
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-07 08:17 -0800
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-07 08:23 -0800
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 18:44 -0800
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 18:27 -0800
Re: function pointer question Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-03 22:05 +0000
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-03 16:39 -0800
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-04 12:15 +0100
Re: function pointer question Kaz Kylheku <046-301-5902@kylheku.com> - 2026-01-06 20:33 +0000
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-06 17:01 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-03 06:08 +0000
Re: function pointer question "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-01-05 12:40 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 04:30 +0000
Re: function pointer question "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2026-01-06 17:05 -0800
Re: function pointer question James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-01-03 17:20 -0500
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-03 16:48 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-05 08:39 +0000
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 12:32 +0000
Re: function pointer question highcrew <high.crew3868@fastmail.com> - 2026-01-06 13:59 +0100
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 13:57 +0000
Re: function pointer question antispam@fricas.org (Waldek Hebisch) - 2026-01-06 14:50 +0000
Re: function pointer question highcrew <high.crew3868@fastmail.com> - 2026-01-06 21:44 +0100
Re: function pointer question scott@slp53.sl.home (Scott Lurndal) - 2026-01-06 22:08 +0000
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-07 05:59 -0800
Re: function pointer question antispam@fricas.org (Waldek Hebisch) - 2026-01-07 09:25 +0000
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-07 11:37 +0100
Re: function pointer question Michael S <already5chosen@yahoo.com> - 2026-01-06 15:47 +0200
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 14:01 +0000
Re: function pointer question David Brown <david.brown@hesbynett.no> - 2026-01-06 15:55 +0100
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 16:44 +0000
Re: function pointer question scott@slp53.sl.home (Scott Lurndal) - 2026-01-06 15:41 +0000
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 16:45 +0000
Re: function pointer question James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-01-06 10:58 -0500
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-06 16:49 +0000
Re: function pointer question James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-01-06 12:09 -0500
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-07 21:18 +0000
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-09 09:14 -0800
Re: function pointer question Andrey Tarasevich <noone@noone.net> - 2026-01-10 19:17 -0800
Re: function pointer question "James Russell Kuyper Jr." <jameskuyper@alumni.caltech.edu> - 2026-01-10 22:39 -0500
Re: function pointer question Tim Rentsch <tr.17687@z991.linuxsc.com> - 2026-01-11 11:49 -0800
Re: function pointer question James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-01-05 06:47 -0500
Re: function pointer question James Kuyper <jameskuyper@alumni.caltech.edu> - 2026-01-02 14:03 -0500
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 19:41 +0000
Re: function pointer question bart <bc@freeuk.com> - 2026-01-02 19:18 +0000
Re: function pointer question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2026-01-02 11:43 -0800
Re: function pointer question Michael Sanders <porkchop@invalid.foo> - 2026-01-02 19:44 +0000
csiph-web