Re: Types, Re: printf("%p \n", (void *)0);
pete <pfiland@mindsp ring.com> writes:
[color=blue]
> Tim Rentsch wrote:[color=green]
> >
> > pete <pfiland@mindsp ring.com> writes:
> >[color=darkred]
> > > The only two incomplete types that I'm aware of are
> > > void
> > > and ones of the form
> > > array[][/color]
> >
> > Also 'struct whatever' when a definition for the struct
> > has not yet been given. (And union too of course...)[/color]
>
> Thank you.
> I believe "definition " isn't the best word to use there.[/color]
Right. The language used in the standard document is different - it
speaks of a struct or union type having "unknown content", and the
appearance a type declaration with stuff between the braces as
"defining the content" of a struct or union type, and struct/union
tags are only declared, whether or not they have their content defined
with a '{ member-list }' clause.
Of course, what I meant was that something like 'struct whatever' would
declare the type, and 'struct whatever { int foo; }' would define the
type, and probably that's what most people understood. But you're
right that it doesn't match the language of the standard document.
So my statement might be emended as:
Also 'struct whatever' when the struct content has not yet been
defined. (And union too of course...)
pete <pfiland@mindsp ring.com> writes:
[color=blue]
> Tim Rentsch wrote:[color=green]
> >
> > pete <pfiland@mindsp ring.com> writes:
> >[color=darkred]
> > > The only two incomplete types that I'm aware of are
> > > void
> > > and ones of the form
> > > array[][/color]
> >
> > Also 'struct whatever' when a definition for the struct
> > has not yet been given. (And union too of course...)[/color]
>
> Thank you.
> I believe "definition " isn't the best word to use there.[/color]
Right. The language used in the standard document is different - it
speaks of a struct or union type having "unknown content", and the
appearance a type declaration with stuff between the braces as
"defining the content" of a struct or union type, and struct/union
tags are only declared, whether or not they have their content defined
with a '{ member-list }' clause.
Of course, what I meant was that something like 'struct whatever' would
declare the type, and 'struct whatever { int foo; }' would define the
type, and probably that's what most people understood. But you're
right that it doesn't match the language of the standard document.
So my statement might be emended as:
Also 'struct whatever' when the struct content has not yet been
defined. (And union too of course...)
Comment