[TUHS] The evolution of Unix facilities and architecture
Dave Horsfall
dave at horsfall.org
Sat May 13 07:12:14 AEST 2017
On Fri, 12 May 2017, Hellwig Geisse wrote:
> > char* cp1;
> > char* cp2;
> >
> > etc, which IMHO makes it clear (which is every programmer's duty). I
> > used to write that way in a previous life, and the boss didn't
> > complain.
>
> This view does not work well with more complicated declarations like
> "void (*p)(int)". What is the "fundamental type" here? One could argue
> that the real culprit is the list construction, which does not mix well
> with C declarations.
Let's see:
aneurin% cdecl
Type `help' or `?' for help
explain void (*p)(int)
declare p as pointer to function (int) returning void
So the "fundamental" type (if there was such a thing) would be a pointer
to a function, I guess i.e. don't treat it as anything else.
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
More information about the TUHS
mailing list