[comp.unix.aix] No-prototype warning wanted from xlc

ng@cfd.di.nrc.ca (Kai Ng) (04/07/91)

Hi,

I wonder if one can instruct the xlc compiler to issue a warning message
whenever a function is used but not prototyped. Other ANSI C compilers
I've used before generate such warning unless explicitly suppressed.
However xlc seems happy with that.

Have I overlooked any option on the man page?

Thanks in advance.

...Kai

-- 
-----------------------------------------------------------------------------
Kai S. Ng                     Informatics, National Research Council Canada
INTERNET ng@cfd.di.nrc.ca     M-60 Montreal Road, Ottawa, Canada    K1A 0R6
BITNET   kain@nrcvm01.bitnet  VOICE (613) 993-0240       FAX (613) 954-2561

prener@watson.ibm.com (Dan Prener) (04/10/91)

Are you invoking it by the name "xlc" instead of "cc"?
-- 
                                   Dan Prener (prener @ watson.ibm.com)

ng@cfd.di.nrc.ca (Kai Ng) (04/10/91)

In article <1991Apr9.231833.1440@watson.ibm.com>, prener@watson.ibm.com (Dan Prener) writes:
|> Are you invoking it by the name "xlc" instead of "cc"?
|> -- 
|>                                    Dan Prener (prener @ watson.ibm.com)

I use "xlc" which according to the doc is strictly ANSI. BTW, I have
attempted both but none provides the feature I wanted.

Any further idea?

Thanks
...Kai

-- 
-----------------------------------------------------------------------------
Kai S. Ng                     Informatics, National Research Council Canada
INTERNET ng@cfd.di.nrc.ca     M-60 Montreal Road, Ottawa, Canada    K1A 0R6
BITNET   kain@nrcvm01.bitnet  VOICE (613) 993-0240       FAX (613) 954-2561

freese@dalvm41b.vnet.ibm.com ("Bradley T. Freese") (05/15/91)

ng@cfd.di.nrc.ca (Kai Ng) writes:

>
> Hi,
>
> I wonder if one can instruct the xlc compiler to issue a warning message
> whenever a function is used but not prototyped. Other ANSI C compilers
> I've used before generate such warning unless explicitly suppressed.
> However xlc seems happy with that.
>
> Have I overlooked any option on the man page?

No, there is no way to do this.  This function was not included in the
design document for the compiler.  The assumption was that most people
would be migrating K&R code and did not want to deal with the error
messages.  You might want to contact your local IBM representative
and request a "design change."  Until then, I recommend using 'lint'
to check your code.