Garrett Wollman <wollman@khavrinen.lcs.mit.edu> writes:
(In the FreeBSD Project, and probably many other places, our coding standard is very explicit: don't use typedefs for structures. This deficiency in C is precisely the reason for making that requirement.)
I'm completely with Garrett on this. Pointers to incomplete structs make *great* opaque datatypes in C; typedefs have considerably more problems and are really annoying to deal with. It's really a shame that FILE wasn't instead defined as a pointer to an incomplete struct, since the way it works right now, lots of headers that have no need whatsoever of all the crap in stdio.h have to include it solely because there's one function (which many callers may not even use) that takes a FILE * as an argument. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>