This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] [PR 13005] Warn about casting of incomplete types

Stephen Ma <> writes:

| > Most of the text in your patch refers to "casting from/to incomplete
| > types", but that isn't actually what you are warning about; you are
| > warning about casting to/from *pointers* (or references) to
| > incomplete types.  Please clarify this.
| The documentation was already long enough.

Being long enough is no excuse for confusion.

| Since a pointer/reference
| to an incomplete type is also an incomplete type,

A pointer to an incomplete type is NOT an incomplete type.  It is
*complete* type.  You can define objects of such type.  The notion of
complete/incomplete type applies only to _object_ types.  A reference
type is NOT an object type.  So it is confusing to speak of a
reference type as an incomplete type. 

| as far as the
| predicate COMPLETE_TYPE_P is concerned, I decided to use that meaning
| in the documentation too.  

It is an error to laod an implementation detail of that obscurity
level into the manual.  Please correct the wording as Jason suggested.

-- Gaby

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]