https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81677

--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> ---
On Wed, 2 Aug 2017, chris.ol...@iti-global.com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81677
> 
> --- Comment #4 from chris.ol...@iti-global.com ---
> (In reply to jos...@codesourcery.com from comment #3)
> > Because the type doesn't exist,
> 
> I don't know what you mean by a type that "doesn't exist". A declared but

A type that is not part of the set of types defined in the language 
(whether by derivation from other types or otherwise).

Array types in C90 are constructed only by array type derivation (or by 
being a standard typedef in a system header).  Array type derivation only 
derives array types from complete types, not from incomplete types.  There 
is no such type as "array of struct s" at a point in the program where 
struct s is an incomplete type.

> > neither does a pointer to such a type, as pointer types can only be 
> > derived from types that exist, not from types that don't exist.
> 
> Are you saying that pointers can't point to incomplete types? That's expressly
> allowed by pointers. Especially in the case of a member pointing to its own
> struct.

No, the definition of array type derivation only produces array types 
derived from object types, but the definition of pointer type derivation 
also produces pointer types derived from incomplete and function types.  
But the type from which a pointer is derived has itself to exist (whether 
through being a basic type such as char, or through being itself derived 
in one of the listed ways of deriving types - which do not include 
deriving arrays from incomplete types).

Reply via email to