This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Google SoC Project proposal: Wcoercion option


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]