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


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


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