The overall patch is OK. Please could add testcases that test
-Wno-conversion? Thanks for doing this.
Thanks. I've committed the patch and a testcase that makes sure we
don't emit a warning if Wconversion is turned off.
-eric
On Fri, 13 Jan 2006, Eric Christopher wrote:
|
| > | OK?
| >
| > yes.
| >
| > | Did you want me to add this as a testcase?
| >
| > yes -- so that we don't regress.
|
| Ok. apparently I tested in the wrong directory and we already have a
| few testcases that test whether we're emitting warnings. I
On Jan 13, 2006, at 8:13 AM, Dan Kegel wrote:
Hi Eric!
I agree, moving warnings on benign conversions to -Wconversion
would help groups porting large codebases from earlier versions of
gcc.
As long as you're in that area, got any opinion on
http://gcc.gnu.org/PR9072
FWIW I agree with Jose
| OK?
yes.
| Did you want me to add this as a testcase?
yes -- so that we don't regress.
Ok. apparently I tested in the wrong directory and we already have a
few testcases that test whether we're emitting warnings. I've cleaned
up the testsuite (and added a quick patch to cvt.c to add a
Hi Eric!
I agree, moving warnings on benign conversions to -Wconversion
would help groups porting large codebases from earlier versions of gcc.
As long as you're in that area, got any opinion on
http://gcc.gnu.org/PR9072
?
--
Wine for Windows ISVs: http://kegel.com/wine/isv
Eric Christopher <[EMAIL PROTECTED]> writes:
| >
| > -Wconversion is a good idea. I don't think -Wtraditional is relevant.
|
| Here's the patch to implement it. Avoids the warning in this testcase
| when -Wconversion is not passed on the command line:
|
| int func1(int i)
| {
|return i;
| }
-Wconversion is a good idea. I don't think -Wtraditional is relevant.
Here's the patch to implement it. Avoids the warning in this testcase
when -Wconversion is not passed on the command line:
int func1(int i)
{
return i;
}
int main()
{
float f;
long l;
unsigned long ul;
f = 1.
Eric Christopher <[EMAIL PROTECTED]> writes:
| So, for calls in c++ we're warning unconditionally on something like:
|
| int bar (int a, int b);
|
| int main (void)
| {
|float foo = 5.0;
|float baz = 10.0;
|
|bar (foo, baz);
|
|return 0;
| }
|
| int bar (int a, int b)
| {
|
So, for calls in c++ we're warning unconditionally on something like:
int bar (int a, int b);
int main (void)
{
float foo = 5.0;
float baz = 10.0;
bar (foo, baz);
return 0;
}
int bar (int a, int b)
{
return a + b;
}
whereas in C we're warning depending on Wtraditional or Wconversio