Google SoC Project proposal: Wcoercion option
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed Apr 26 18:39:00 GMT 2006
lopezibanez@gmail.com writes:
Hi,
this looks good. I hope you get the funds to work on it.
[...]
| The proposal of Joseph Myers[6] defines the basic goal of
| thisproject, which is to create a new option: Wcoercion. This new
| optionwill warn for any implicit conversion that may alter a
| value.
I hope that does not fire up warnings for the following case and variants
struct A { /* ... */ };
struct B { /* ... */ };
struct C : A, B { /* ... */ };
void f(B*);
C c;
f(&c);
as the call to f(), implies an implicit conversion from C to B, that
alters the value of "&c".
-- Gaby
More information about the Gcc
mailing list