Re: [PATCH] Re: conversion warnings in c++

2006-01-17 Thread Eric Christopher
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

Re: [PATCH] Re: conversion warnings in c++

2006-01-14 Thread Gabriel Dos Reis
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

Re: conversion warnings in c++

2006-01-13 Thread Eric Christopher
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

Re: [PATCH] Re: conversion warnings in c++

2006-01-13 Thread Eric Christopher
| 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

Re: conversion warnings in c++

2006-01-13 Thread Dan Kegel
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

Re: [PATCH] Re: conversion warnings in c++

2006-01-12 Thread Gabriel Dos Reis
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; | }

[PATCH] Re: conversion warnings in c++

2006-01-12 Thread Eric Christopher
-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.

Re: conversion warnings in c++

2006-01-11 Thread Gabriel Dos Reis
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) | { |

conversion warnings in c++

2006-01-11 Thread Eric Christopher
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