Newsgroups: gnu.gcc.bug
From: horst.krae...@snafu.de (Horst Kraemer)
Date: 1999/02/08
Subject: Re: gcc -Wconversion and function with char argument
[ posted and mailed] On Mon, 08 Feb 1999 14:09:07 +0100, ludovic.wa...@inist.fr (Ludovic WALLE) wrote: Correct. Perhaps you misunderstood the meaning of '-Wconversion'. > When I try to compile the following source file chararg.c: > void f (char c) {} > int main () > with the -Wconversion option: > gcc -Wconversion chararg.c > I get the message: > chararg.c: In function `main': > It seems to happend with any function having a char argument. -Wconversion warns whenever the declaration void f (char c); would lead to a different conversion sequence than the prototype-less void f(); If you call f('A') then the argument 'A' has type int. If f is declared as 'void f(char)' then 'A' will be converted to char Regards You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||