Path: utzoo!utgpu!watmath!clyde!att!rutgers!cmcl2!nrl-cmf!ames!pasteur!ucbvax!hplabs!hpda!hpcuhb!hpsmtc1!swh
From: swh@hpsmtc1.HP.COM (Steve Harrold)
Newsgroups: comp.lang.c
Subject: Re: function declarations
Message-ID: <11480014@hpsmtc1.HP.COM>
Date: 7 Dec 88 15:23:15 GMT
References: <661@infmx.UUCP>
Organization: Hewlett Packard, Cupertino
Lines: 24

Re: Function prototypes

The MSC /Zg switch is useful, but doesn't do everything.  For example,

1) All parameters that are structs or pointer to structs get translated to
   "struct UNNAMED".  If you then use these function prototypes in your code,
   you will get compile-time messages announcing a type mismatch between the
   the non-existent "struct UNNAMED" and whatever struct is actually in your
   code.  For MSC, this is a warning, and the compilation succeeds.  For
   Turbo C, this is an error, and compilation fails.  For older (non-ANSI)
   compilers, there is no message.

2) If you use  in your parameter list, the function prototype that
   is generated names a type "va_alist", rather than inserting the "..." string
   that ANSI uses to denote optional (varargs) parameters.  Again, the
   compiler complains about the mismatch (usually "too many parameters").

Still, it's better than nothing.
--
---------------------
Steve Harrold			...hplabs!hpsmtc1!swh
				HPG200/13
				(408) 447-5580
---------------------