Why have xxx_t typedef names (was Re: Is typedef char BUFFER[20] legal?)

The Grey Wolf greywolf at unisoft.UUCP
Thu Feb 14 10:21:57 AEST 1991


Is there/will there ever be a compile-time / cpp-time evaluation as to
what types are defined?  For example:

#if typed(stat_t)
.
.
#endif	/* typed(stat_t) */

or even:

#if typed(struct stat)
.
.
#endif	/* typed(struct stat) */

This would eliminate the need for putting that stuff in .h files like
#ifndef _STAT_H_
#define _STAT_H_
.
.
.
#endif	/* !_STAT_H_ */

There are many times I've wanted such a beast.

Also, do typedefs ever make it into an object's/executable's nlist?
'Twould be real nice to be able to determine defined types from the
nlist of the compiled code.
-- 
thought:  I ain't so damb dumn! | Your brand new kernel just dump core on you
war: Invalid argument           | And fsck can't find root inode 2
                                | Don't worry -- be happy...
...!{ucbvax,acad,uunet,amdahl,pyramid}!unisoft!greywolf



More information about the Comp.lang.c mailing list