Composite type

I'm reading now ISO/IEC 9899:TC2 draft and confusing about that composite type (6.2.7, in c11 same punt). I cannot get when such construction could be useful.

P.S. Sorry, it's rather pure c question but maybe in c++ the same story is.
The standard's example is pretty self-explanatory:

if you declare a function as

int f(int (*)(), double (*)[3]);
(function taking a pointer to function that takes ANY number of arguments of any type and returns int, and a pointer to an array of three doubles)

and then declare it AGAIN as

int f(int (*)(char *), double (*)[]);
(function taking a pointer to function that takes one argument of type char* and returns int, and a pointer to an array of ANY number of doubles

then as far as the compiler is concerned, you just declared

int f(int (*)(char *), double (*)[3]);

so you can't call it with a pointer to an array of 5 doubles, for example (but you could the second function)
Cubbi, OK, so it's not about constructing new types but just control behaviour of old ones, right?
The composite type is the result of putting the puzzle pieces together. The declarations could be in any order; one is not controlling the other.
It's about the compiler coming up with a type when faced with conflicting declarations for the same variable, and the rules it should follow to be conforming.
Topic archived. No new replies allowed.