Query about typedef type-checking
Steve Hosgood
iiit-sh at cybaswan.UUCP
Fri Sep 9 21:22:32 AEST 1988
Sorry to have to post this, it's a fairly trivial question I know, but I
don't have a copy of the proposed ANSI spec.
Put simply, does the upcoming standard intend to enforce (or warn about)
mixing 'typedef'-ed types even if the fundamental items 'beneath' the typedefs
are the same?
Specifically, if you have the following:
void fred(long *);
typedef long funny_t;
main()
{
funny_t a;
fred(&a);
....
}
..will the compilers barf, or produce a warning or what?
Obviously, the code itself is perfectly runnable, and portable, as long as
the typedef of 'funny' continues to be a 'long'.
I'd like to see a warning here - am I alone?
Am I going to be dissapointed?
Thanks in advance.
Please E-mail, I'll summarise.
-----------------------------------------------+------------------------------
Steve Hosgood BSc, | Phone (+44) 792 295213
Image Processing and Systems Engineer, | Fax (+44) 792 295532
Institute for Industrial Information Techology,| Telex 48149
Innovation Centre, University of Wales, +------+ JANET: iiit-sh at uk.ac.swan.pyr
Swansea SA2 8PP | UUCP: ..!ukc!cybaswan.UUCP!iiit-sh
----------------------------------------+-------------------------------------
My views are not necessarily those of my employers!
More information about the Comp.std.c
mailing list