Re: Pointer to undeclared structure-type considered ok?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, 2 Feb 2005, Nick Patavalis wrote:

On 2005-02-02, Eljay Love-Jensen <eljay@xxxxxxxxx> wrote:

What warning (or error) were you thinking that the provided example source code should produce when compiled/linked?


Well, I guess something about an incomplete type, or undefined type, or similar.


So uh, just curious, but how were you planning to make linked lists of structures easily?



The standard idiom is:


struct foo { int value; struct foo *next; };

Note that at the point of saying "struct foo *next", struct foo is not a complete type.

--Dan

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux