Article View: comp.std.c
Article #5355Query about typedef type-checking
From: Steve Hosgood
Date: Fri, 09 Sep 1988 11:22
Date: Fri, 09 Sep 1988 11:22
39 lines
1710 bytes
1710 bytes
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@uk.ac.swan.pyr
Swansea SA2 8PP | UUCP: ..!ukc!cybaswan.UUCP!iiit-sh
----------------------------------------+-------------------------------------
My views are not necessarily those of my employers!
Technical Details
Message-ID:
<74@cybaswan.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!reading!cf-cm!cybaswan!iiit-shShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!reading!cf-cm!cybaswan!iiit-sh From: iiit-sh@cybaswan.UUCP (Steve Hosgood) Newsgroups: comp.std.c Subject: Query about typedef type-checking Keywords: ANSI, dpANS, warnings, types, checking Message-ID: <74@cybaswan.UUCP> Date: 9 Sep 88 11:22:32 GMT Organization: Institute for Industrial Information Technology Lines: 39