Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Counting in binary is just like counting in decimal -- if you are all thumbs. -- Glaser and Way


devel / comp.lang.c / Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

SubjectAuthor
* "Catch-23: The New C Standard,Sets the World on Fire" by TerenceLynn McGuire
+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJim Kelly
|`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceLynn McGuire
+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Rene Kita
|`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Kenny McCormack
| +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Scott Lurndal
| `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Rene Kita
|  `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Kenny McCormack
|   +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Dan Cross
|   |+* (realloc) Angels and pins (Was: "Catch-23: The New C Standard,Sets the World on Kenny McCormack
|   ||`- Re: (realloc) Angels and pins (Was: "Catch-23: The New C Standard,Sets the WorldDan Cross
|   |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|   | +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Dan Cross
|   | `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|   `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceLynn McGuire
| `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Dan Cross
|  |+- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceOpus
|  |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  ||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Dan Cross
|  |||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
|  ||||+- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Scott Lurndal
|  ||||+- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  |||||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
|  ||||| +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||| |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||| `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with John Forkosh
|  |||| +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
|  |||| `* Re: "Catch-23: The New C Standard,Sets the World on Fire" byKaz Kylheku
|  ||||  `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   |||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||| +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   ||| |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| ||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   ||| || +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| || `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceMalcolm McLean
|  ||||   ||| ||  `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   ||| |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   ||| | `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceBart
|  ||||   ||| |  +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   ||| |  `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  ||||   ||| |   `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceBart
|  ||||   ||| +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||| ||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| || `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||| ||  +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| ||  |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||| ||  `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   ||| |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Spiros Bousbouras
|  ||||   ||| | `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||| |  `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||| `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   ||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||  `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||   `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||    `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||     `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDan Cross
|  ||||   ||      `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   ||       `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Kalevi Kolttonen
|  ||||   ||        `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceBart
|  ||||   ||         `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Kalevi Kolttonen
|  ||||   |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   ||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || ||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || ||||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceÖö Tiib
|  ||||   || |||| | |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | | +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   || |||| | | |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" byIke Naar
|  ||||   || |||| | | | +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  ||||   || |||| | | | |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceÖö Tiib
|  ||||   || |||| | | | `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | | `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceÖö Tiib
|  ||||   || |||| | |  `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | |   `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | |    +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | |    `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   || |||| | |     `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejames...@alumni.caltech.edu
|  ||||   || |||| | |      +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
|  ||||   || |||| | |      `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   || |||| | |       `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejames...@alumni.caltech.edu
|  ||||   || |||| | |        `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   || |||| | +- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Scott Lurndal
|  ||||   || |||| | ||+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | |||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terencejak
|  ||||   || |||| | ||+- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   || |||| | ||`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |||| | +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   || |||| | `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceDavid Brown
|  ||||   || |||| `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   || |||`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   || ||`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceJames Kuyper
|  ||||   || |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   || `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Keith Thompson
|  ||||   |`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  ||||   `* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  |||`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Ben Bacarisse
|  ||`- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  |+* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  |`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Phil Carmody
|  +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Lowell Gilbert
|  +* Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
|  `- Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Tim Rentsch
+- Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceBonita Montero
`* Re: "Catch-23: The New C Standard,Sets the World on Fire" by TerenceMichael S

Pages:12345678
Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<a90dd97b-41f5-45f4-a19a-0d2bb1968fbcn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25388&group=comp.lang.c#25388

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:198c:b0:3e3:9275:17b4 with SMTP id u12-20020a05622a198c00b003e3927517b4mr4287459qtc.10.1681200517357;
Tue, 11 Apr 2023 01:08:37 -0700 (PDT)
X-Received: by 2002:a05:622a:1cf:b0:3de:748e:fd30 with SMTP id
t15-20020a05622a01cf00b003de748efd30mr545828qtw.10.1681200517150; Tue, 11 Apr
2023 01:08:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 11 Apr 2023 01:08:36 -0700 (PDT)
In-Reply-To: <878rezz962.fsf@bsb.me.uk>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <u0fn0g$34scf$1@dont-email.me> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me> <681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me> <87sfd7fuwn.fsf@nosuchdomain.example.com>
<slrnu39103.dr6.ike@iceland.freeshell.org> <878rezz962.fsf@bsb.me.uk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a90dd97b-41f5-45f4-a19a-0d2bb1968fbcn@googlegroups.com>
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 11 Apr 2023 08:08:37 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3888
 by: Öö Tiib - Tue, 11 Apr 2023 08:08 UTC

On Tuesday, 11 April 2023 at 01:04:22 UTC+3, Ben Bacarisse wrote:
> Ike Naar <i...@sdf.org> writes:
>
> > On 2023-04-10, Keith Thompson <Keith.S.T...@gmail.com> wrote:
> >> jak <nos...@please.ty> writes:
> >>> I apologize. The type of data was, perhaps, more complex, also it was
> >>> not a declaration but a cast for which I asked for advice on this
> >>> newsgroup a few years ago and more than one person replied that the only
> >>> way was through a typedef.
> >>
> >> I do not believe that there have been any changes to the standard that
> >> cause some construct to require a typedef where a typedef was not
> >> previously required. I suspect that anyone who said that "the only
> >> way was through a typedef" was mistaken. (It's likely that a typedef
> >> would make the code easier to read.)
> >>
> >> It's entirely possible that I'm mistaken, and if so I would very much
> >> like to know about it.
> >
> > An example: a function that returns a pointer to a function of the same type.
> > It's mentioned in comp.lang.c FAQ 1.22,
> > <https://c-faq.com/decl/recurfuncp.html>.
>
> I don't think that's an example of something that can only be done with
> a typedef. For one thing, it can't be done at all (/even/ using a
> typedef), but when one /is/ used, surely it's just to make the
> almost-doing it code easier to read?
>
Yes. For other thing jak says it was not the point but example
about issues because of evolution of languages and changes in standards.
That can't be such example as a function returning pointer to function of same
type can not be declared by any standard of C (nor C++). Also as
dereferencing function pointers is now implicit (but explicit
dereferencing is also not illegal) the standards have actually relaxed
it a bit.

I suspect that jak is not vague because of translation to English but
because he remembers disliking some breaking change
between standards years ago but has now forgot what it was.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u1395d$2ivmc$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25389&group=comp.lang.c#25389

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:27:08 +0200
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <u1395d$2ivmc$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 09:27:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="22b76096fb402042beebc8c1f2bbd923";
logging-data="2719436"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ebvezg4iEK9xtWPwepgVbrCJtPsFt8hg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Cancel-Lock: sha1:SfgBypOsM7J/OeorkudX6/QDKEY=
Content-Language: en-GB
In-Reply-To: <u11dt3$28648$1@dont-email.me>
 by: David Brown - Tue, 11 Apr 2023 09:27 UTC

On 10/04/2023 18:35, jak wrote:
> James Kuyper ha scritto:
>> On 4/10/23 11:43, jak wrote:
>>> James Kuyper ha scritto:
>>>> On 4/10/23 10:37, jak wrote:
>>>> ...
>>>>>> Instead, explain to me why, after all the improvements introduced
>>>>>> by the
>>>>> standards, it is no longer possible to declare a specialized function
>>>>> pointer array without first declaring the typedef that defines the
>>>>> function pointer and why.
>>>>
>>>> "specialized function pointer array"? Are you posting that to the
>>>> correct newsgroup?
>>>> Even if this were comp.lang.c++, you've just swerved off into an
>>>> entirely different conversational direction - I would recommend
>>>> starting
>>>> a new thread to discuss that issue.
>>>>
>>>
>>> Please tell me you're joking...
>>
>> No, I'm dead serious. This is the wrong newsgroup to discuss specialized
>> functions, because C doesn't have them. There would be both more
>> interest, and more expertise, for a discussion of that issue in
>> comp.lang.c++ than here.
>> I'm also dead serious about the change in Subject. When you introduce a
>> radical change of topic, it is indeed good netiquette to make a
>> corresponding change to the "Subject:" header.
>>
>
> What I can't explain to you is that you are fixated on terminology while
> I'm trying to explain myself largely using the google translator. By
> specialized function (this is the google translation) I mean a function
> that has return values and parameters different from the inte type so
> not like:
>
> int foo(int)
>
> You could, however, propose to the newsgroup manager that non-native
> English speakers should not use it... or become less meticulous.

In order to have any hope of communicating properly, it is important to
use correct terminology. If we all use vague words based on what they
sometimes mean in English, we'll never get anywhere - all our time will
be spent asking each other what we mean.

This is a C language group. The source of all terms is the C standards.
These are easily found online, for all the different versions of C
(technically only the draft versions are freely available, but these are
fine for almost all use-cases). The standards documents are not easy
reading even for native English speakers, but you must at least
appreciate that the terms we all use here come from those documents.

We realise that you are not a native English speaker - that applies to
many of the regular posters here, who come from all around the world. I
believe some find that Google translate can help a bit, but it cannot
handle technical programming terms and expressions. It may be unfair,
but if you want to be a serious programmer, learning more English is
unavoidable. (That does /not/ mean we expect perfect English!)

Along with that, giving code examples showing what you mean can be very
helpful.

I believe that what you are talking about is the distinction between
"function prototype declarations" and "non-prototype function
declarations" (also sometimes known as "K&R function declarations"). In
ancient C, described in excellent but the long outdated first edition of
the book "The C Programming Language", functions were assumed to take a
single "int" parameter and return an "int", unless declared otherwise.
This type of function declaration was replaced in C90 by "prototypes"
specifying the return type and parameter type. Although function
prototype declarations are better in virtually every way, the old style
remained supported for backwards compatibility. Only now, in C23, has
support for them been removed entirely.

The only real use I have seen for non-prototype function declarations is
a "general" function pointer in arrays containing mixed function pointer
types. Such use is no longer allowed in C23. Is that what you are
concerned about? Normally a better choice of general function pointer
is "void foo(void)", rather than "int foo()". (In C23, the later would
now mean "int foo(void)".)

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25390&group=comp.lang.c#25390

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:289:b0:3de:bafb:82bf with SMTP id z9-20020a05622a028900b003debafb82bfmr4337935qtw.4.1681206230127;
Tue, 11 Apr 2023 02:43:50 -0700 (PDT)
X-Received: by 2002:a05:620a:1a83:b0:746:8786:5bfc with SMTP id
bl3-20020a05620a1a8300b0074687865bfcmr4446214qkb.0.1681206229992; Tue, 11 Apr
2023 02:43:49 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 11 Apr 2023 02:43:49 -0700 (PDT)
In-Reply-To: <u11jlk$290gn$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=84.50.190.130; posting-account=pysjKgkAAACLegAdYDFznkqjgx_7vlUK
NNTP-Posting-Host: 84.50.190.130
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me> <681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
From: oot...@hot.ee (Öö Tiib)
Injection-Date: Tue, 11 Apr 2023 09:43:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5489
 by: Öö Tiib - Tue, 11 Apr 2023 09:43 UTC

On Monday, 10 April 2023 at 21:14:24 UTC+3, jak wrote:
> Öö Tiib ha scritto:
> > On Monday, 10 April 2023 at 19:36:00 UTC+3, jak wrote:
> >> James Kuyper ha scritto:
> >>> On 4/10/23 11:43, jak wrote:
> >>>> James Kuyper ha scritto:
> >>>>> On 4/10/23 10:37, jak wrote:
> >>>>> ...
> >>>>>>> Instead, explain to me why, after all the improvements introduced
> >>>>>>> by the
> >>>>>> standards, it is no longer possible to declare a specialized function
> >>>>>> pointer array without first declaring the typedef that defines the
> >>>>>> function pointer and why.
> >>>>>
> >>>>> "specialized function pointer array"? Are you posting that to the
> >>>>> correct newsgroup?
> >>>>> Even if this were comp.lang.c++, you've just swerved off into an
> >>>>> entirely different conversational direction - I would recommend starting
> >>>>> a new thread to discuss that issue.
> >>>>>
> >>>>
> >>>> Please tell me you're joking...
> >>>
> >>> No, I'm dead serious. This is the wrong newsgroup to discuss specialized
> >>> functions, because C doesn't have them. There would be both more
> >>> interest, and more expertise, for a discussion of that issue in
> >>> comp.lang.c++ than here.
> >>> I'm also dead serious about the change in Subject. When you introduce a
> >>> radical change of topic, it is indeed good netiquette to make a
> >>> corresponding change to the "Subject:" header.
> >>>
> >>
> >> What I can't explain to you is that you are fixated on terminology while
> >> I'm trying to explain myself largely using the google translator. By
> >> specialized function (this is the google translation) I mean a function
> >> that has return values and parameters different from the inte type so
> >> not like:
> >>
> >> int foo(int)
> >>
> > That indeed is change of subject, what you post is not array, and it is
> > still unclear what you want. We can define variable of type of array of
> > function pointers without any typedefs like that:
> >
> > double (*array_of_function_pointers[52]) (float f, char c);
> >
> > That AFAIK works both in C and in C++.
> >
> >> You could, however, propose to the newsgroup manager that non-native
> >> English speakers should not use it... or become less meticulous.
> >
> > What newsreader it is that does not let you to start a new thread
> > or to change the subject line when you want to change subject?
> > Never seen such thing.
> >
>
> I apologize. The type of data was, perhaps, more complex, also it was
> not a declaration but a cast for which I asked for advice on this
> newsgroup a few years ago and more than one person replied that the only
> way was through a typedef. But that wasn't the point. The point was to
> be able to say that thanks to the continuous changes to follow the
> standards some things that worked have stopped.

Yes there are some breaking changes between standards of C.
The amount of such changes is far lower than between versions of
most other popular programming languages. The tradition
of backwards compatibility is ver high in C. Each breaking change
felt to have more than one good reason to break the code that it
broke (to me). Similar sentiments are probably the reason why people
are asking you to be more precise about the example that you talk
about. If you have forgotten it then it wasn't perhaps that important?

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86a5ze4r2o.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25396&group=comp.lang.c#25396

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 04:05:19 -0700
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <86a5ze4r2o.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <u0h4n4$1usij$1@news.xmission.com> <u0jcmt$3r2ce$1@dont-email.me> <u0jem9$2033d$1@news.xmission.com> <u0jrr7$jvd$2@reader2.panix.com> <87bkk26sx1.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="b8523dcffbf3f55a5b42bbad23f83ee0";
logging-data="2740034"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+4GjTMIEzw5MSNXxpeBap9Z8osABvknMY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:7yDUj0Qp0aQJhJNXf9LthHa0AcA=
sha1:2yxwPcQfa4Wp2Uj3asBt4wtfVzA=
 by: Tim Rentsch - Tue, 11 Apr 2023 11:05 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> cross@spitfire.i.gajendra.net (Dan Cross) writes:

[..concerning whether realloc() with a size of 0 must free()..]

>> The authors presented it as a universal property of
>> all implementations, but it just is not.
>
> I don't think they do.

Right.

> They state that "The C89 and C99 standards committees strongly
> recommended that allocation interfaces malloc, calloc, and realloc
> return a null pointer in response to zero-byte requests" and that
> this "implies that realloc(p,0) should unconditionally free(p)".
> I don't know where that recommendation comes from (the PDF is
> missing footnotes > 27)

I believe the authors mean to refer to statements in the two C
Rationale documents (and indeed it is the case that these
documents discuss matters concerning how memory management
behave).

> and the implication seems to be a bit of a stretch, but if they
> just assumed this to be universal, why explain that it was
> recommended?

To me it seems clear that the authors mean to distinguish between
what behaviors are /recommended/ (or at least that they think are
recommended) and what behaviors are /described or specified/ by
the various C standards over the years (which definitely have
changed in different official releases of the C standard). And
it seems obvious that the authors recognize that these two things
are not the same.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<865ya24p4i.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25397&group=comp.lang.c#25397

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 04:47:25 -0700
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <865ya24p4i.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <u0uk66$1or41$1@dont-email.me> <u0v3vh$df3$1@reader2.panix.com> <u10erc$23rhg$1@dont-email.me> <u117rb$9r2$2@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="b8523dcffbf3f55a5b42bbad23f83ee0";
logging-data="2748885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186sRaUboifuw+n0nlc6H2593L798SUJYc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:rFt2l0RDWzQHizkaR3UsnXaAveo=
sha1:ZeZRZyaSF5FSFF3R07ecPWu0ubY=
 by: Tim Rentsch - Tue, 11 Apr 2023 11:47 UTC

cross@spitfire.i.gajendra.net (Dan Cross) writes:

> In article <u10erc$23rhg$1@dont-email.me>, jak <nospam@please.ty> wrote:
>
>> Dan Cross ha scritto:
>>
>>> In article <u0uk66$1or41$1@dont-email.me>, jak <nospam@please.ty> wrote:
>>>
>>>> Tim Rentsch ha scritto:
>>>>
>>>>> [snip]
>>>>> I agree with the general tone of this suggestion. Unfortunately
>>>>> however the particular code suggested might not compile (because
>>>>> the macro NULL might be #define'd to be 0, which can result in an
>>>>> error). Writing the function this way:
>>>>>
>>>>> void *
>>>>> realloc0( void *p, size_t size ){
>>>>> return size == 0 ? free( p ), p = 0 : realloc( p, size );
>>>>> }
>>>>>
>>>>> is an easy way to avoid that implementation dependency.
>>>>
>>>> If you absolutely wanted to avoid dependency, perhaps you shouldn't rely
>>>> on autocast and use an explicit one instead.
>>>
>>> What "dependency" would that avoid, other than a dependency on
>>> the C standard?
>>
>> Why are you asking me this?
>
> Because you are the one who suggested there is some kind of
> "dependency" in Tim's code?

I didn't take his comment that way. My impression is that he
meant there _might_ be a dependency, or perhaps there is some
uncertainty about whether there is a dependency, or possibly that
there may be a dependency at some time in the future. Of course
I am not sure what he meant, but that is how I took it.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86y1my3afk.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25398&group=comp.lang.c#25398

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 04:50:07 -0700
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <86y1my3afk.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <u11aau$27go8$1@dont-email.me> <u11afa$1jl$2@reader2.panix.com> <u11bll$27m86$1@dont-email.me> <u11grn$q26$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="b8523dcffbf3f55a5b42bbad23f83ee0";
logging-data="2748885"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IZZJ+gEQ6IXUHNokwQ2uRYNG0RYQLa5g="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:f590xVbT2c9kf9d1a8IkYdWiG7Q=
sha1:Gu0tDrxeGgeOeqEnTtYm7a+7Bm8=
 by: Tim Rentsch - Tue, 11 Apr 2023 11:50 UTC

cross@spitfire.i.gajendra.net (Dan Cross) writes:

[...]

> Why don't we let him speak for himself?

+1

It would be nice if people would follow this precept
more often.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86ttxm39xe.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25399&group=comp.lang.c#25399

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 05:01:01 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <86ttxm39xe.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk> <u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk> <u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me> <878rezhahb.fsf@nosuchdomain.example.com> <u11lem$2996k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="b8523dcffbf3f55a5b42bbad23f83ee0";
logging-data="2752061"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+0N+uJmvxSsS9AyxDfdmcyaWxvQenbjgk="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:5e7Ddj0qS6wVLSLNJ5ABRIPk7W4=
sha1:wqs4U9rwoDXAvkxrTOOOZh6qVvo=
 by: Tim Rentsch - Tue, 11 Apr 2023 12:01 UTC

jak <nospam@please.ty> writes:

[...]

> It's not my intention to be arrogant but here it's like sticking a
> stick in a wasp's nest. I've never been able to exchange more than
> one comment with the same person who immediately makes a new person
> aware and, honestly, I find the way many people respond particularly
> aggressive and often it seems like I'm talking to lawyers rather
> than programmers. I Already stopped posting here many years ago for
> the same reason even though I've always followed. I tried again but
> nothing has changed and I'll go back to just reading. However, I
> would like you to notice that there are few new arrivals and perhaps
> the cause is this climate.

For what it's worth I think the people who write these responses
are actually trying to be helpful. I think sometimes they don't
understand that what they think will be helpful doesn't really
help the person being responded to (such as yourself).

Incidentally, I am curious. Do you mind saying what your native
language is?

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86pm8a38jb.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25400&group=comp.lang.c#25400

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 05:31:04 -0700
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <86pm8a38jb.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk> <u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk> <u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="b8523dcffbf3f55a5b42bbad23f83ee0";
logging-data="2757325"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/CTSPYXAf9JKnM0RGRDgOf3vpEwUTAOkc="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:0m/fL+nTYETPDkmEh03iy5wU2F8=
sha1:ve/lBUZnH7i4XWfyJNmcT/AKKqs=
 by: Tim Rentsch - Tue, 11 Apr 2023 12:31 UTC

James Kuyper <jameskuyper@alumni.caltech.edu> writes:

> "Several operators convert operand values from one type to another
> automatically. This subclause specifies the result required from
> such an implicit conversion, as well as those that result from a
> cast operation (an explicit conversion)." (6.3p1)
>
> The terms "implicit conversion" and "explicit conversion" are both
> italicized in the actual standard, which is an ISO convention
> indicating that the sentence in which they occur is the official
> definition of what those terms mean.
>
> Implicit conversions occur in the following contexts:
>
> The integer promotions (6.3.1.1p2).
> The usual arithmetic conversions (6.3.1.8p1).
>
> An lvalue of array type is implicitly converted into a pointer to
> the first element of that array in many contexts (6.3.2p3). This is
> done as a convenience, but has led many people to confuse arrays
> with pointers.
>
> A function designator is implicitly converted into a pointer to the
> designated function in many contexts (6.3.2p4).
>
> The default argument promotions (6.5.2.2p6).
>
> Simple assignment (6.5.16.1p2).
>
> As-if by assignment:
> Arguments of function declared with a prototype. (6.5.2.2p7, 6.9.1p10)
> Return expression. (6.8.6.4p3)

Good list.

There is one other case of same rule as assignment, which is
scalar initializer values, either in declarations or in
compound literals.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13mep$2l286$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25401&group=comp.lang.c#25401

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: nos...@please.ty (jak)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 15:14:02 +0200
Organization: A noiseless patient Spider
Lines: 86
Message-ID: <u13mep$2l286$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me>
<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 13:14:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="897bf5fcfa82b8b554dc5907b33929a1";
logging-data="2787590"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+dszEEbr03b5HwDEweXyJC"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.16
Cancel-Lock: sha1:7E6dLuWdnTKA6AcfhXV6SPgxR4k=
In-Reply-To: <f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
 by: jak - Tue, 11 Apr 2023 13:14 UTC

Öö Tiib ha scritto:
> On Monday, 10 April 2023 at 21:14:24 UTC+3, jak wrote:
>> Öö Tiib ha scritto:
>>> On Monday, 10 April 2023 at 19:36:00 UTC+3, jak wrote:
>>>> James Kuyper ha scritto:
>>>>> On 4/10/23 11:43, jak wrote:
>>>>>> James Kuyper ha scritto:
>>>>>>> On 4/10/23 10:37, jak wrote:
>>>>>>> ...
>>>>>>>>> Instead, explain to me why, after all the improvements introduced
>>>>>>>>> by the
>>>>>>>> standards, it is no longer possible to declare a specialized function
>>>>>>>> pointer array without first declaring the typedef that defines the
>>>>>>>> function pointer and why.
>>>>>>>
>>>>>>> "specialized function pointer array"? Are you posting that to the
>>>>>>> correct newsgroup?
>>>>>>> Even if this were comp.lang.c++, you've just swerved off into an
>>>>>>> entirely different conversational direction - I would recommend starting
>>>>>>> a new thread to discuss that issue.
>>>>>>>
>>>>>>
>>>>>> Please tell me you're joking...
>>>>>
>>>>> No, I'm dead serious. This is the wrong newsgroup to discuss specialized
>>>>> functions, because C doesn't have them. There would be both more
>>>>> interest, and more expertise, for a discussion of that issue in
>>>>> comp.lang.c++ than here.
>>>>> I'm also dead serious about the change in Subject. When you introduce a
>>>>> radical change of topic, it is indeed good netiquette to make a
>>>>> corresponding change to the "Subject:" header.
>>>>>
>>>>
>>>> What I can't explain to you is that you are fixated on terminology while
>>>> I'm trying to explain myself largely using the google translator. By
>>>> specialized function (this is the google translation) I mean a function
>>>> that has return values and parameters different from the inte type so
>>>> not like:
>>>>
>>>> int foo(int)
>>>>
>>> That indeed is change of subject, what you post is not array, and it is
>>> still unclear what you want. We can define variable of type of array of
>>> function pointers without any typedefs like that:
>>>
>>> double (*array_of_function_pointers[52]) (float f, char c);
>>>
>>> That AFAIK works both in C and in C++.
>>>
>>>> You could, however, propose to the newsgroup manager that non-native
>>>> English speakers should not use it... or become less meticulous.
>>>
>>> What newsreader it is that does not let you to start a new thread
>>> or to change the subject line when you want to change subject?
>>> Never seen such thing.
>>>
>>
>> I apologize. The type of data was, perhaps, more complex, also it was
>> not a declaration but a cast for which I asked for advice on this
>> newsgroup a few years ago and more than one person replied that the only
>> way was through a typedef. But that wasn't the point. The point was to
>> be able to say that thanks to the continuous changes to follow the
>> standards some things that worked have stopped.
>
> Yes there are some breaking changes between standards of C.
> The amount of such changes is far lower than between versions of
> most other popular programming languages. The tradition
> of backwards compatibility is ver high in C. Each breaking change
> felt to have more than one good reason to break the code that it
> broke (to me). Similar sentiments are probably the reason why people
> are asking you to be more precise about the example that you talk
> about. If you have forgotten it then it wasn't perhaps that important?
>
>
>

Don't be too hard on me and above all give me the time necessary to find
that thread. Thinking about it, I remembered a few things that will help
me find it. For example, at that time Bart asked me if he could use a
piece of my code in one of his essays or books, and no, now it's no
longer necessary to have an answer because following their advice and
using the typedef I solved my problem. Anyway I'm looking for the thread
but it's been almost 20 years, maybe more. For now I only remember that
it concerned arrays with function pointers and it did not concern their
declaration but a cast to their type... but looking for a thread from 20
years ago... this is really a waste of time.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13u5k$2llhr$3@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25402&group=comp.lang.c#25402

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:25:40 -0400
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <u13u5k$2llhr$3@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com>
<20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com>
<u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com>
<u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me>
<u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me>
<u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me>
<u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me>
<u11g0i$28g0k$1@dont-email.me> <rBXYL.1140524$t5W7.570138@fx13.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:25:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++QAWirWumjiNi8p6228iLPs/FvlX5GlA="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:UJzyhRfqfoPgy9yq/KlbjchlHj4=
In-Reply-To: <rBXYL.1140524$t5W7.570138@fx13.iad>
Content-Language: en-US
 by: James Kuyper - Tue, 11 Apr 2023 15:25 UTC

On 4/10/23 13:22, Scott Lurndal wrote:
....
> Well, I've worked with systems where a null pointer was represented by
> the 32-bit value 0xc0eeeeee. So you can't make assumptions, just use
> NULL (or nullptr in C++).

An integer constant expression with a value of 0 always qualifies as a
null pointer constant. Null pointer constants always implicitly convert
to null pointers of the appropriate type when used in pointer contexts.
This has always been the case, regardless of how null pointers are
represented internally.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<874jpmfbbe.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25403&group=comp.lang.c#25403

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 12:50:13 -0700
Organization: None to speak of
Lines: 19
Message-ID: <874jpmfbbe.fsf@nosuchdomain.example.com>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com>
<u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me>
<u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me>
<u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me>
<u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me>
<u1395d$2ivmc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="6b1c659db000f6ddffd5df2e4cc173ab";
logging-data="2849023"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/m6P4u3WdwgNZZY+0Bxf4"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:E83YDRlCr+LF/xUd+GysWfMjCNc=
sha1:ElaplzvteOSrvQnPdCdxT8NyxCw=
 by: Keith Thompson - Tue, 11 Apr 2023 19:50 UTC

David Brown <david.brown@hesbynett.no> writes:
[...]
> The only real use I have seen for non-prototype function declarations
> is a "general" function pointer in arrays containing mixed function
> pointer types. Such use is no longer allowed in C23. Is that what
> you are concerned about? Normally a better choice of general function
> pointer is "void foo(void)", rather than "int foo()". (In C23, the
> later would now mean "int foo(void)".)

I haven't often had a need for a generic function pointer type (as void*
is a generic object pointer type), but I suggest that using a return
type that's not used elsewhere might be safer. If you use `void(void)`
as a generic function type, there's a risk that a call without a cast
will quietly compile.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for XCOM Labs
void Void(void) { Void(); } /* The recursive call of the void */

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13u3a$2llhr$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25404&group=comp.lang.c#25404

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:24:26 -0400
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <u13u3a$2llhr$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u119gi$27go7$1@dont-email.me>
<u11aba$1jl$1@reader2.panix.com> <u11c1o$27m86$2@dont-email.me>
<u11hbv$q26$3@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:24:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rI0Auai/OMXJe3YHqA+Ix9v2O58dXoSo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:0gAX9wyvTgOAeZivDkwfyFZAs14=
In-Reply-To: <u11hbv$q26$3@reader2.panix.com>
Content-Language: en-US
 by: James Kuyper - Tue, 11 Apr 2023 15:24 UTC

On 4/10/23 13:34, Dan Cross wrote:
> In article <u11c1o$27m86$2@dont-email.me>,
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
....
>> This analysis is ultimately a response to the question "What
>> "dependency" would that avoid, other than a dependency on the C
>> standard?". As far as I can tell, you are the one who posted that
>> question, in the message with the header
>>
>> Date: Sun, 9 Apr 2023 19:34:09 -0000 (UTC)
>>
>> The simplest explanation of your confusion I can come up with is that
>> you misunderstood jak as suggesting that that dependency was in Tim's
>> code, rather than Kaz's.
>
> First, please stop emailing me about this. Keep it in USENET.

I've already said this to you by e-mail, and I've explained it before to
the group, but I'll repeat it for the benefit of anyone who doesn't
remember my previous apologies:

I spent more than a decade using a newsreader that had a "Reply" button
that would send a message to the newsgroup, and provided only a
significantly less convenient method for sending a response to the
author (I no longer remember what that method was). A few years ago,
they changed their interface to provide a "Follow Up" button which does
what the old "Reply" button did, and a "Reply" button that now sends a
response only to the author. I've been trying ever since then to break
my habit of hitting the "Reply" button, but with very poor success, as
you have seen. This old dog does not learn new tricks as easily as I
used to. I promise to try to remember to hit the "Follow Up" button
instead, but since that's what I'm already trying to do, I would not
recommend expecting any different results.

> Second, you are making an assumption about user jak's intent.
> Respectfully, I think your assumption is wrong, which leads to
> your (ahem) "confusion." Perhaps try to clarify with jak what
> they mean before continuing the conversation; I tried and was
> rebuffed, but perhaps you will have better luck.

He's had plenty of opportunities to tell us who is interpreting his
words correctly. He's not bothered to do so. Until he does, we'll just
have to agree to disagree.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13u4h$2llhr$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25405&group=comp.lang.c#25405

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:25:04 -0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <u13u4h$2llhr$2@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me> <u11g0i$28g0k$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:25:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19NTvYc1pet/rELKfzY0TZnBJ51D8v2/iI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:V0WMfAGV4jqR/4x2K0D/RDMxJVk=
In-Reply-To: <u11g0i$28g0k$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Tue, 11 Apr 2023 15:25 UTC

On 4/10/23 13:11, jak wrote:
...
> Also I would like to add that the concept of 'standard' that you follow
> with religious attention, IMO, is wrong because up to now it has not
> evolved but it has changed and this is insane. 'Standard' is a luxury
> for programming theorists. Thousands of companies use decades-old
> compilers so they don't have to change millions of lines of currently
> working code. The 'standard' should be followed by compiler makers and
> not compiler users.

The standard is a contract between implementations and users. It was
negotiated by the ISO committee, which includes implementors and users.
You have no obligation to use that contract, and neither does an
implementor. However, an implementation claiming to conform to a
standard can be relied upon to handle code in a manner consistent with
what the standard says, and can be held accountable if it fails to do
so. Without the standard, you have nothing to rely on but the
implementation's documentation. That may be sufficient for code that
only needs to work properly on one particular implementation, but if you
have any larger ambitions for your software, the standard is what you
must rely upon to achieve them.

> ... In the discussion of this thread we discuss a
> ternary operator which returns 0 in one rung and a pointer in the other.
> The standard says that 0 can be raised to a null pointer and it is true
> but tomorrow someone will change the 'standard' and this will no longer
> be true.

A key point to consider is that the relevant guarantee is NOT for a
value of 0, but for null pointer constants (NPCs). NULL expands to an
NPC. The integer constant 0 also qualifies as one. The expression
"free(p), 0" does not qualify as a null pointer constant, even though
it's an expression of integer type and a value of 0.

It is extremely unlikely that the committee will ever change those
rules. You might, with equal plausibility, worry about he possibility
that the short-circuit behavior of && and || operators might disappear.
If you're worrying about changes on that level, C becomes essentially
unusable - you should change to a different language that gives you less
worries.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13u6d$2llhr$4@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25406&group=comp.lang.c#25406

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:26:05 -0400
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <u13u6d$2llhr$4@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me> <87sfd7fuwn.fsf@nosuchdomain.example.com>
<slrnu39103.dr6.ike@iceland.freeshell.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:26:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wIN/s5GrvQsw5qlQltlzImOI8FNQorrs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:ckcAOCjruqGMqRlm5L7PgLfPHGs=
Content-Language: en-US
In-Reply-To: <slrnu39103.dr6.ike@iceland.freeshell.org>
 by: James Kuyper - Tue, 11 Apr 2023 15:26 UTC

On 4/10/23 17:47, Ike Naar wrote:
> On 2023-04-10, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
....
>> I do not believe that there have been any changes to the standard that
>> cause some construct to require a typedef where a typedef was not
>> previously required. I suspect that anyone who said that "the only
>> way was through a typedef" was mistaken. (It's likely that a typedef
>> would make the code easier to read.)
>>
>> It's entirely possible that I'm mistaken, and if so I would very much
>> like to know about it.
>
> An example: a function that returns a pointer to a function of the
> same type.
> It's mentioned in comp.lang.c FAQ 1.22,
> <https://c-faq.com/decl/recurfuncp.html>.

That's not an example of a construct requiring the use of a typedef. A
typedef is convenient, but not required. As it says on that page:

"without [the typedef], the state variable would have to be declared as
funcptr (*state)() and the call would contain a bewildering cast of the
form (funcptr (*)())(*state)()."

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13una$2llhr$5@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25407&group=comp.lang.c#25407

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:35:06 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <u13una$2llhr$5@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me>
<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
<u13mep$2l286$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:35:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YDrilRd1vpe2Qa42NK/bqEWbJ6MwNpqs="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:btj0RsJ6bCFz+HFDRTTSUsBSa1w=
In-Reply-To: <u13mep$2l286$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Tue, 11 Apr 2023 15:35 UTC

On 4/11/23 09:14, jak wrote:
....
> that thread. Thinking about it, I remembered a few things that will help
> me find it. For example, at that time Bart asked me if he could use a
> piece of my code in one of his essays or books, and no, now it's no
> longer necessary to have an answer because following their advice and
> using the typedef I solved my problem. Anyway I'm looking for the thread
> but it's been almost 20 years, maybe more. For now I only remember that
> it concerned arrays with function pointers and it did not concern their
> declaration but a cast to their type... but looking for a thread from 20
> years ago... this is really a waste of time.

The fundamental problem is that, in C, a typedef is nothing more than an
synonym for a type. In any context where you use a typedef, you could
also use the explicit type itself. Therefore, it's not possible that you
were forced to use a typedef. A typedef often makes code easier to read
and write, but is never necessary. The kind of code you're talking about
is one of the contexts where that is true.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u13v3f$2llhr$6@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25408&group=comp.lang.c#25408

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 11:41:35 -0400
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <u13v3f$2llhr$6@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me> <u1395d$2ivmc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 15:41:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oSfx5jmREYoHD+Vd/l0jPWkYZ2UWiX8E="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:Lgi8qOwp2H2DIJb9Kr5/5A9bbTg=
In-Reply-To: <u1395d$2ivmc$1@dont-email.me>
Content-Language: en-US
 by: James Kuyper - Tue, 11 Apr 2023 15:41 UTC

On 4/11/23 05:27, David Brown wrote:
....> declarations" (also sometimes known as "K&R function
declarations"). In
> ancient C, described in excellent but the long outdated first edition of
> the book "The C Programming Language", functions were assumed to take a
> single "int" parameter and return an "int", unless declared otherwise.

"If the expression that precedes the parenthesized argument list in
a function call consists solely of an identifier, and if no
declaration is visible for this identifier, the identifier is
implicitly declared exactly as if, in the innermost block containing
the function call, the declaration

extern int identifier();

appeared."

(C90 6.3.2.2)

Note that the function is implicitly declared using the K&R syntax, not
as a function prototype. That syntax declares it as taking an
unspecified number of arguments of unspecified types, not as taking a
single "int" argument.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u140og$2llhr$7@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25409&group=comp.lang.c#25409

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!news.chmurka.net!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 12:09:52 -0400
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <u140og$2llhr$7@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me>
<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
<u13mep$2l286$1@dont-email.me> <u13una$2llhr$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 11 Apr 2023 16:09:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4ecdcf2c4434dca85a4296a322fac3a8";
logging-data="2807355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+vOtdby8VMwOGyAqpp4306C9VWp5CHlgE="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:HdjJ45q3gYVbp9P+NZ+g7Xmnwq4=
Content-Language: en-US
In-Reply-To: <u13una$2llhr$5@dont-email.me>
 by: James Kuyper - Tue, 11 Apr 2023 16:09 UTC

On 4/11/23 11:35, James Kuyper wrote:
....
> The fundamental problem is that, in C, a typedef is nothing more than an
> synonym for a type. In any context where you use a typedef, you could
> also use the explicit type itself. Therefore, it's not possible that you
> were forced to use a typedef. A typedef often makes code easier to read
> and write, but is never necessary. The kind of code you're talking about
> is one of the contexts where that is true.

Note that this is NOT true in C++: the type that a typedef describes can
have a different language linkage than the function that it is used to
declare. This allows a function's name to have different language
linkage than the function's type:

extern "C" typedef void FUNC();
FUNC f2; // the name f2 has C ++ language linkage and the
// function’s type has C language linkage
(C++ standard, 9.11p5)

This is the only case I'm aware of, in either language, where a typedef
is necessary, and not merely convenient.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u1416h$2m01j$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25410&group=comp.lang.c#25410

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 16:17:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 45
Sender: <untosten@0.0.0.0>
Message-ID: <u1416h$2m01j$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u119gi$27go7$1@dont-email.me> <u11aba$1jl$1@reader2.panix.com> <u11c1o$27m86$2@dont-email.me> <u11hbv$q26$3@reader2.panix.com> <u13u3a$2llhr$1@dont-email.me>
Injection-Date: Tue, 11 Apr 2023 16:17:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4397a5af1fd96b23a68363887da75dc3";
logging-data="2818099"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+auQsCHKXizNTpgI9+ziy9w5W3Pp7NE5U="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.2.9-200.fc37.x86_64 (x86_64))
Cancel-Lock: sha1:RqcPVtQ8wSy9JDKKFSSYMFRlQ8M=
 by: Kalevi Kolttonen - Tue, 11 Apr 2023 16:17 UTC

James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
> I spent more than a decade using a newsreader that had a "Reply" button
> that would send a message to the newsgroup, and provided only a
> significantly less convenient method for sending a response to the
> author (I no longer remember what that method was). A few years ago,
> they changed their interface to provide a "Follow Up" button which does
> what the old "Reply" button did, and a "Reply" button that now sends a
> response only to the author. I've been trying ever since then to break
> my habit of hitting the "Reply" button, but with very poor success, as
> you have seen. This old dog does not learn new tricks as easily as I
> used to. I promise to try to remember to hit the "Follow Up" button
> instead, but since that's what I'm already trying to do, I would not
> recommend expecting any different results.

My deepest apologies for this off-topic post, but I must say
that I feel your pain.

I had this TV "digibox" about 10 years ago. Its GUI design was pretty
crazy right from the beginning. The menu that applied to recorded
TV programs had "delete" (single item) and "delete all" right next
to each other. So it would be pretty easy to delete all your recordings
by accident. Somehow I avoided doing so.

After many years, one day I updated the digibox to the latest
software version. After the update, the "delete" and "delete all"
were still next to each other, but their location was different.

After watching an episode of Star Trek TNG, my intention was to
delete it in order to save disk space. Using mental autopilot
I pointed the cursor to the same location where "delete"
had been for many years. I was then asked to confirm the
deletion. While still on total autopilot, I quickly replied
"yes".

BANG! The next thing I knew was that all my recordings were
gone and there were at least one hundred of them! The GUI
designers had placed "delete all" to the very same location
that used to have "delete" (single item).

It is hard to believe this kind of GUI design can be real.
I do not remember the digibox manufacturer any more. It
could have been Topfield, but I am not sure.

br,
KK

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u144ge$2m8gk$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25411&group=comp.lang.c#25411

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: bc...@freeuk.com (Bart)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 18:13:51 +0100
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <u144ge$2m8gk$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u119gi$27go7$1@dont-email.me>
<u11aba$1jl$1@reader2.panix.com> <u11c1o$27m86$2@dont-email.me>
<u11hbv$q26$3@reader2.panix.com> <u13u3a$2llhr$1@dont-email.me>
<u1416h$2m01j$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 11 Apr 2023 17:13:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0991c2e26d22fa208b4eddf0bb3a771";
logging-data="2826772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zT/GRRPxmtJZ3odKH51UQ8kkQg9GvMsA="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Cancel-Lock: sha1:Ujoifv1IMyw5tow6xecou95Nt8Q=
In-Reply-To: <u1416h$2m01j$1@dont-email.me>
 by: Bart - Tue, 11 Apr 2023 17:13 UTC

On 11/04/2023 17:17, Kalevi Kolttonen wrote:
> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>> I spent more than a decade using a newsreader that had a "Reply" button
>> that would send a message to the newsgroup, and provided only a
>> significantly less convenient method for sending a response to the
>> author (I no longer remember what that method was). A few years ago,
>> they changed their interface to provide a "Follow Up" button which does
>> what the old "Reply" button did, and a "Reply" button that now sends a
>> response only to the author. I've been trying ever since then to break
>> my habit of hitting the "Reply" button, but with very poor success, as
>> you have seen. This old dog does not learn new tricks as easily as I
>> used to. I promise to try to remember to hit the "Follow Up" button
>> instead, but since that's what I'm already trying to do, I would not
>> recommend expecting any different results.
>
> My deepest apologies for this off-topic post, but I must say
> that I feel your pain.
>
> I had this TV "digibox" about 10 years ago. Its GUI design was pretty
> crazy right from the beginning. The menu that applied to recorded
> TV programs had "delete" (single item) and "delete all" right next
> to each other. So it would be pretty easy to delete all your recordings
> by accident. Somehow I avoided doing so.
>
> After many years, one day I updated the digibox to the latest
> software version. After the update, the "delete" and "delete all"
> were still next to each other, but their location was different.
>
> After watching an episode of Star Trek TNG, my intention was to
> delete it in order to save disk space. Using mental autopilot
> I pointed the cursor to the same location where "delete"
> had been for many years. I was then asked to confirm the
> deletion. While still on total autopilot, I quickly replied
> "yes".
>
> BANG! The next thing I knew was that all my recordings were
> gone and there were at least one hundred of them! The GUI
> designers had placed "delete all" to the very same location
> that used to have "delete" (single item).
>
> It is hard to believe this kind of GUI design can be real.

Is there no confirmation needed for 'Delete All'? That would be
incredibly bad design and should been reported on the original too.

I have a PVR that is older than ten years, and that will confirm first,
I think even for single items.

Although even that could go wrong: it should report how many items will
be affected, in case you'd clicked the wrong button.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u1473c$2mhe7$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25415&group=comp.lang.c#25415

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 17:58:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 72
Sender: <untosten@0.0.0.0>
Message-ID: <u1473c$2mhe7$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u119gi$27go7$1@dont-email.me> <u11aba$1jl$1@reader2.panix.com> <u11c1o$27m86$2@dont-email.me> <u11hbv$q26$3@reader2.panix.com> <u13u3a$2llhr$1@dont-email.me> <u1416h$2m01j$1@dont-email.me> <u144ge$2m8gk$1@dont-email.me>
Injection-Date: Tue, 11 Apr 2023 17:58:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4397a5af1fd96b23a68363887da75dc3";
logging-data="2835911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198DbssOBVL6v3TPmBn13dUk7BAucpN9S8="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.2.9-200.fc37.x86_64 (x86_64))
Cancel-Lock: sha1:2uPNchPd+XGctFHlUNi/rBK2yqI=
 by: Kalevi Kolttonen - Tue, 11 Apr 2023 17:58 UTC

Bart <bc@freeuk.com> wrote:
> On 11/04/2023 17:17, Kalevi Kolttonen wrote:
>> James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>>> I spent more than a decade using a newsreader that had a "Reply" button
>>> that would send a message to the newsgroup, and provided only a
>>> significantly less convenient method for sending a response to the
>>> author (I no longer remember what that method was). A few years ago,
>>> they changed their interface to provide a "Follow Up" button which does
>>> what the old "Reply" button did, and a "Reply" button that now sends a
>>> response only to the author. I've been trying ever since then to break
>>> my habit of hitting the "Reply" button, but with very poor success, as
>>> you have seen. This old dog does not learn new tricks as easily as I
>>> used to. I promise to try to remember to hit the "Follow Up" button
>>> instead, but since that's what I'm already trying to do, I would not
>>> recommend expecting any different results.
>>
>> My deepest apologies for this off-topic post, but I must say
>> that I feel your pain.
>>
>> I had this TV "digibox" about 10 years ago. Its GUI design was pretty
>> crazy right from the beginning. The menu that applied to recorded
>> TV programs had "delete" (single item) and "delete all" right next
>> to each other. So it would be pretty easy to delete all your recordings
>> by accident. Somehow I avoided doing so.
>>
>> After many years, one day I updated the digibox to the latest
>> software version. After the update, the "delete" and "delete all"
>> were still next to each other, but their location was different.
>>
>> After watching an episode of Star Trek TNG, my intention was to
>> delete it in order to save disk space. Using mental autopilot
>> I pointed the cursor to the same location where "delete"
>> had been for many years. I was then asked to confirm the
>> deletion. While still on total autopilot, I quickly replied
>> "yes".
>>
>> BANG! The next thing I knew was that all my recordings were
>> gone and there were at least one hundred of them! The GUI
>> designers had placed "delete all" to the very same location
>> that used to have "delete" (single item).
>>
>> It is hard to believe this kind of GUI design can be real.
>
> Is there no confirmation needed for 'Delete All'? That would be
> incredibly bad design and should been reported on the original too.

If you read carefully what I wrote, I did say:

"I was then asked to confirm the deletion. While still on
total autopilot, I quickly replied "yes".

So, yes, the confirmation was indeed needed. But after
many years of using this digibox, I was like a Pavlov's Dog,
fully conditioned to know the location of "Delete"
(single item). When that basic assumption failed, all hell
broke loose and I just clicked "Yes" simply not realizing
that the button was now "Delete All".

I cannot remember if it said "Want to delete all items"
or "Want to delete this item".

All in all, my user mistake was also involved, but I still
very much blame those who:

1) First put "Delete" and "Delete All" right next to each other
2) Then put "Delete All" to where "Delete" was previously

I really have no education concerning how to design GUIs, but
I am pretty sure this is *not* the way to do it.

br,
KK

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86ile13jiq.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25416&group=comp.lang.c#25416

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Tue, 11 Apr 2023 19:46:05 -0700
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <86ile13jiq.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me> <681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com> <u11jlk$290gn$1@dont-email.me> <f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com> <u13mep$2l286$1@dont-email.me> <u13una$2llhr$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="00dd14a5b0fe7fcb33b04c058bf64644";
logging-data="3034812"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19c611lQy+OfgO/1/Q9vWGbdtbxkAxm8kA="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:d8l2DECWD2nPKNvPKLHFjEypK/I=
sha1:PSJI0oVuKhAS74RpMW51fFUKIDU=
 by: Tim Rentsch - Wed, 12 Apr 2023 02:46 UTC

James Kuyper <jameskuyper@alumni.caltech.edu> writes:

> On 4/11/23 09:14, jak wrote:
> ...
>
>> that thread. Thinking about it, I remembered a few things that
>> will help me find it. For example, at that time Bart asked me if
>> he could use a piece of my code in one of his essays or books, and
>> no, now it's no longer necessary to have an answer because
>> following their advice and using the typedef I solved my problem.
>> Anyway I'm looking for the thread but it's been almost 20 years,
>> maybe more. For now I only remember that it concerned arrays with
>> function pointers and it did not concern their declaration but a
>> cast to their type... but looking for a thread from 20 years
>> ago... this is really a waste of time.
>
> The fundamental problem is that, in C, a typedef is nothing more
> than an synonym for a type. In any context where you use a typedef,
> you could also use the explicit type itself. [...]

Strictly speaking this assertion isn't quite right. Here is an
example:

typedef long Elongator( int );

extern const Elongator *elongator;

There is no way to declare the pointer object 'elongator' without
the use of a typedef.

It may be worth noting that using a type qualifier directly on a
function type is explicitly undefined behavior (but not a constraint
violation). However, an implementation might want to take advantage
of that in defining a language extension.

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<ea984bd9-b83e-4105-9dee-7b517c2c6fd2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25417&group=comp.lang.c#25417

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:3704:b0:74a:9516:e5d8 with SMTP id de4-20020a05620a370400b0074a9516e5d8mr3343714qkb.2.1681278295822;
Tue, 11 Apr 2023 22:44:55 -0700 (PDT)
X-Received: by 2002:a05:620a:4547:b0:745:3e2c:3d5a with SMTP id
u7-20020a05620a454700b007453e2c3d5amr1738868qkp.12.1681278295626; Tue, 11 Apr
2023 22:44:55 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 11 Apr 2023 22:44:55 -0700 (PDT)
In-Reply-To: <86ile13jiq.fsf@linuxsc.com>
Injection-Info: google-groups.googlegroups.com; posting-host=108.45.179.220; posting-account=Ix1u_AoAAAAILVQeRkP2ENwli-Uv6vO8
NNTP-Posting-Host: 108.45.179.220
References: <u0fn0g$34scf$1@dont-email.me> <u0jt3l$cmu$1@reader2.panix.com>
<u0k3au$3uelq$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com>
<20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com>
<u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com>
<u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me>
<u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me>
<u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me>
<u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com> <u11jlk$290gn$1@dont-email.me>
<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com> <u13mep$2l286$1@dont-email.me>
<u13una$2llhr$5@dont-email.me> <86ile13jiq.fsf@linuxsc.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ea984bd9-b83e-4105-9dee-7b517c2c6fd2n@googlegroups.com>
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
From: jameskuy...@alumni.caltech.edu (james...@alumni.caltech.edu)
Injection-Date: Wed, 12 Apr 2023 05:44:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3567
 by: james...@alumni.calt - Wed, 12 Apr 2023 05:44 UTC

On Tuesday, April 11, 2023 at 10:46:24 PM UTC-4, Tim Rentsch wrote:
> James Kuyper <james...@alumni.caltech.edu> writes:
....
> > The fundamental problem is that, in C, a typedef is nothing more
> > than an synonym for a type. In any context where you use a typedef,
> > you could also use the explicit type itself. [...]
>
> Strictly speaking this assertion isn't quite right. Here is an
> example:
>
> typedef long Elongator( int );
>
> extern const Elongator *elongator;

I'm confused by that declaration - what is the 'const' supposed to mean in that context? Normally, I would read that declaration as saying that elongator is an identifier with external linkage, and that (*elongator)(5) returns a "const long", which makes no sense to me.

> There is no way to declare the pointer object 'elongator' without
> the use of a typedef.
> It may be worth noting that using a type qualifier directly on a
> function type is explicitly undefined behavior (but not a constraint
> violation).

gcc shares my confusion about that declaration, referring to precisely that rule:
elongator.h:2:25: warning: ISO C forbids qualified function types [-Wpedantic]
2 | extern const Elongator *elongator;
| ^~~~~~~~~
That error message disappears if I move the 'const', so that it qualifies elongator, which makes a lot more sense to me:
extern Elongator * const elongator;

and it accepts, as compatible, the following declaration of the same identifier:

extern long(*const elongator)(int);

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u15nk7$2uuci$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25418&group=comp.lang.c#25418

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Wed, 12 Apr 2023 09:46:14 +0200
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <u15nk7$2uuci$1@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <u0jt3l$cmu$1@reader2.panix.com>
<u0k3au$3uelq$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com>
<20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com>
<u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com>
<u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me>
<u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me>
<u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me>
<u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me>
<681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com>
<u11jlk$290gn$1@dont-email.me>
<f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com>
<u13mep$2l286$1@dont-email.me> <u13una$2llhr$5@dont-email.me>
<86ile13jiq.fsf@linuxsc.com>
<ea984bd9-b83e-4105-9dee-7b517c2c6fd2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 12 Apr 2023 07:46:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d06c7d45ca18550b05af9f30f64f63aa";
logging-data="3111314"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+T13BdfZ+7re4+dbplS3jRp/ZMrDkSsfU="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Cancel-Lock: sha1:toL69maWWbRZ1+bmHZoSHT5N4cM=
In-Reply-To: <ea984bd9-b83e-4105-9dee-7b517c2c6fd2n@googlegroups.com>
Content-Language: en-GB
 by: David Brown - Wed, 12 Apr 2023 07:46 UTC

On 12/04/2023 07:44, james...@alumni.caltech.edu wrote:
> On Tuesday, April 11, 2023 at 10:46:24 PM UTC-4, Tim Rentsch wrote:
>> James Kuyper <james...@alumni.caltech.edu> writes:
> ...
>>> The fundamental problem is that, in C, a typedef is nothing more
>>> than an synonym for a type. In any context where you use a typedef,
>>> you could also use the explicit type itself. [...]
>>
>> Strictly speaking this assertion isn't quite right. Here is an
>> example:
>>
>> typedef long Elongator( int );
>>
>> extern const Elongator *elongator;
>
> I'm confused by that declaration - what is the 'const' supposed to mean in that context? Normally, I would read that declaration as saying that elongator is an identifier with external linkage, and that (*elongator)(5) returns a "const long", which makes no sense to me.
>

The "const" applies to the function type, not the return type of the
function type. That, of course, makes even less sense (how could a
function /not/ be const in C?) - and as noted it the result is undefined
behaviour. But this is described in the semantics section (6.7.3p10),
not the constraints section.

>> There is no way to declare the pointer object 'elongator' without
>> the use of a typedef.
>> It may be worth noting that using a type qualifier directly on a
>> function type is explicitly undefined behavior (but not a constraint
>> violation).
>
> gcc shares my confusion about that declaration, referring to precisely that rule:
> elongator.h:2:25: warning: ISO C forbids qualified function types [-Wpedantic]
> 2 | extern const Elongator *elongator;
> | ^~~~~~~~~
> That error message disappears if I move the 'const', so that it qualifies elongator, which makes a lot more sense to me:
> extern Elongator * const elongator;
>
> and it accepts, as compatible, the following declaration of the same identifier:
>
> extern long(*const elongator)(int);

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<u15nuh$2uuci$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25419&group=comp.lang.c#25419

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence
Kelly with Special Guest Borer Yekai Pan
Date: Wed, 12 Apr 2023 09:51:45 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <u15nuh$2uuci$2@dont-email.me>
References: <u0fn0g$34scf$1@dont-email.me> <87zg7n89zw.fsf@bsb.me.uk>
<u0ig61$64g$1@reader2.panix.com> <874jpv84uv.fsf@bsb.me.uk>
<u0jt3l$cmu$1@reader2.panix.com> <u0k3au$3uelq$1@dont-email.me>
<u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com>
<86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me>
<871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me>
<u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me>
<u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me>
<u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me>
<u11dt3$28648$1@dont-email.me> <u1395d$2ivmc$1@dont-email.me>
<874jpmfbbe.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 12 Apr 2023 07:51:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d06c7d45ca18550b05af9f30f64f63aa";
logging-data="3111314"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/NnR3mAp5hofkfrxANHKyqam+hUAa0QY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Cancel-Lock: sha1:29ud/lnyPaz8wziF82rGZ7YOfUM=
Content-Language: en-GB
In-Reply-To: <874jpmfbbe.fsf@nosuchdomain.example.com>
 by: David Brown - Wed, 12 Apr 2023 07:51 UTC

On 11/04/2023 21:50, Keith Thompson wrote:
> David Brown <david.brown@hesbynett.no> writes:
> [...]
>> The only real use I have seen for non-prototype function declarations
>> is a "general" function pointer in arrays containing mixed function
>> pointer types. Such use is no longer allowed in C23. Is that what
>> you are concerned about? Normally a better choice of general function
>> pointer is "void foo(void)", rather than "int foo()". (In C23, the
>> later would now mean "int foo(void)".)
>
> I haven't often had a need for a generic function pointer type (as void*
> is a generic object pointer type), but I suggest that using a return
> type that's not used elsewhere might be safer. If you use `void(void)`
> as a generic function type, there's a risk that a call without a cast
> will quietly compile.
>

That would be even better, yes. But would you not want the non-existent
type to be used for a parameter, rather than the return type? (You
could use it for both.)

Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

<86edop30jx.fsf@linuxsc.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=25420&group=comp.lang.c#25420

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan
Date: Wed, 12 Apr 2023 02:35:46 -0700
Organization: A noiseless patient Spider
Lines: 82
Message-ID: <86edop30jx.fsf@linuxsc.com>
References: <u0fn0g$34scf$1@dont-email.me> <u0lm3j$8iu$1@reader2.panix.com> <20230407042121.909@kylheku.com> <86r0st3zj0.fsf@linuxsc.com> <u0uk66$1or41$1@dont-email.me> <871qkshmhv.fsf@nosuchdomain.example.com> <u10dvr$23np8$1@dont-email.me> <u11404$26gpq$1@dont-email.me> <u116gd$273m1$1@dont-email.me> <u116uf$275ph$1@dont-email.me> <u119q9$27go7$3@dont-email.me> <u11aqa$27na5$1@dont-email.me> <u11cuh$281i6$1@dont-email.me> <u11dt3$28648$1@dont-email.me> <681e3cb9-65b6-472b-b710-4e492154f238n@googlegroups.com> <u11jlk$290gn$1@dont-email.me> <f222e30c-8842-4cf6-818d-a32e77a61fe2n@googlegroups.com> <u13mep$2l286$1@dont-email.me> <u13una$2llhr$5@dont-email.me> <86ile13jiq.fsf@linuxsc.com> <ea984bd9-b83e-4105-9dee-7b517c2c6fd2n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="00dd14a5b0fe7fcb33b04c058bf64644";
logging-data="3140856"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19z8x2FZGP1cy3LJgYOwO7oQt1tapvBzdA="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:74Off7ptYdIglwBwVSUEeY2ox9A=
sha1:qwsqPstWEejhmgyIe2ZamSinT2A=
 by: Tim Rentsch - Wed, 12 Apr 2023 09:35 UTC

"james...@alumni.caltech.edu" <jameskuyper@alumni.caltech.edu> writes:

> On Tuesday, April 11, 2023 at 10:46:24?PM UTC-4, Tim Rentsch wrote:
>
>> James Kuyper <james...@alumni.caltech.edu> writes:
>
> ...
>
>>> The fundamental problem is that, in C, a typedef is nothing more
>>> than an synonym for a type. In any context where you use a typedef,
>>> you could also use the explicit type itself. [...]
>>
>> Strictly speaking this assertion isn't quite right. Here is an
>> example:
>>
>> typedef long Elongator( int );
>>
>> extern const Elongator *elongator;
>
> I'm confused by that declaration - what is the 'const' supposed to
> mean in that context?

'Elongator' is a function type (that maps an int to a long).

'const Elongator' is a 'const' function type; in other words the
qualifier 'const' applies to the function type as a whole, not
just to the return type of the function.

> Normally, I would read that declaration as
> saying that elongator is an identifier with external linkage, and
> that (*elongator)(5) returns a "const long", which makes no sense to
> me.

If 'elongator' had been declared as follows:

const long (*elongator)( int );

that would give the result you describe. But in effect the
declaration of 'elongator' is the following (not legal C, but
meant to show what is taking place):

extern const (long (int)) *elongator;

so the 'const' modifies the function type itself as a whole, and
not just the return type of the function. The syntax used there
is not allowed in C, which is why a typedef is needed.

>> There is no way to declare the pointer object 'elongator' without
>> the use of a typedef.
>> It may be worth noting that using a type qualifier directly on a
>> function type is explicitly undefined behavior (but not a constraint
>> violation).
>
> gcc shares my confusion about that declaration, referring to
> precisely that rule:
> elongator.h:2:25: warning: ISO C forbids qualified
> function types [-Wpedantic]
> 2 | extern const Elongator *elongator;
> | ^~~~~~~~~

Actually I think gcc is not confused, but has (for some unknown
reason) chosen to give a confusing error message. In point of
fact ISO C does not forbid qualified function types, but simply
says they are undefined behavior.

> That error message disappears if I move the 'const', so that it
> qualifies elongator, which makes a lot more sense to me:
> extern Elongator * const elongator;
>
> and it accepts, as compatible, the following declaration of the
> same identifier:
>
> extern long(*const elongator)(int);

Yes, moving 'const' to the other side of the '*' changes the
meaning of the declaration, just like the two declarations

const int *pci;
int *const cpi;

have different meanings for the types of the respective items
being declared.


devel / comp.lang.c / Re: "Catch-23: The New C Standard,Sets the World on Fire" by Terence Kelly with Special Guest Borer Yekai Pan

Pages:12345678
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor