Sujet : Re: Struct Error
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 24. Jan 2025, 02:23:46
Autres entêtes
Organisation : None to speak of
Message-ID : <87tt9p57j1.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6
User-Agent : Gnus/5.13 (Gnus v5.13)
Lawrence D'Oliveiro <
ldo@nz.invalid> writes:
On Fri, 24 Jan 2025 00:37:27 +0000, bart wrote:
[snipped context restored]
struct scenet *childp;
struct scenet (*childa)[];
};
Yet childp is fine, but childa is a gcc compiler error. Why is that?
>
Because it needs to know the size of the type to work out the function
type’s calling convention.
I restored the context you snipped. There is no function type in the
code Bart was asking about. childa is defined as a pointer to an
(incomplete) array of struct scenet.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */