Google SoC Project proposal: Wcoercion option
lopezibanez@gmail.com
lopezibanez@gmail.com
Thu May 4 23:44:00 GMT 2006
Hi Grabiel,
On 26 Apr 2006 20:36:27 +0200, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> 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".
>
I am sorry to say that I don't understand the definition of struct C.
Would you please write an example that compiles?
Anyway, I plan to divide the different cases into several patches, so
each case can be reviewed and tested independently. Also, I will send
each patch and testcases the list, so I am looking forward to reading
your review. It would be quite an achievement for me to see the option
merged into GCC mainline, so it is my intention to follow developers'
comments, and not to push or force any personal agenda.
Cheers,
Manu.
More information about the Gcc
mailing list