Path: csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: New and improved version of cdecl Date: Sun, 26 Oct 2025 15:38:18 -0700 Organization: None to speak of Lines: 28 Message-ID: <87qzupz3tx.fsf@example.invalid> References: <87bjlyobts.fsf@example.invalid> <10dm4oi$9uhq$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sun, 26 Oct 2025 22:38:21 +0000 (UTC) Injection-Info: dont-email.me; posting-host="26517a9ddea773fd455ba7963423596a"; logging-data="334038"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nrXlpsexjZRwaQuzfUP//" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:fjS+tO9/BaX+Lxz/T4aZPPRYcUc= sha1:cgzO81/SPRnrpXU29ejq/6f4nfc= Xref: csiph.com comp.lang.c:394753 comp.lang.c++:122882 "Chris M. Thomasson" writes: > On 10/22/2025 2:39 PM, Keith Thompson wrote: >> This is cross-posted to comp.lang.c and comp.lang.c++. >> Consider redirecting followups as appropriate. >> cdecl, along with c++decl, is a tool that translates C or C++ >> declaration syntax into English, and vice versa. For example : >> $ cdecl >> Type `help' or `?' for help >> cdecl> explain const char *foo[42] >> declare foo as array 42 of pointer to const char >> cdecl> declare bar as pointer to function (void) returning int >> int (*bar)(void ) >> It's also available via the web site . > I must be doing something wrong: Yes. > int (*fp_read) (void* const, void*, size_t) > > is syntax error. It from one of my older experiments: You're using the old 2.5 version. The newer forked version handles that declaration correctly, but you have to build it from source. cdecl.org uses the old version. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */