prototypes required ?

Paul D. Smith pds at lemming.webo.dg.com
Thu Oct 18 00:30:16 AEST 1990


[] Is it legal for a compilation system to require prototypes when stdarg
[] functions are used ?

The thing you need to remember is that, in the definition of the
stdarg package, each function *must* have at least the first argument
defined; i.e., you cannot declare a function as:

    int my_func( ... );

You must have at least one argument (see K&R II, Sec B7, p 254).  So,
if you are going to add the "..." construct you must declare a
prototype for the first argument.

I see no reason you could just not prototype anything, however:

    int printf();

This should cause no problems.

--

                                                                paul
-----
 ------------------------------------------------------------------
| Paul D. Smith                          | pds at lemming.webo.dg.com |
| Data General Corp.                     |                         |
| Network Services Development           |   "Pretty Damn S..."    |
| Open Network Applications Department   |                         |
 ------------------------------------------------------------------



More information about the Comp.std.c mailing list