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]

conversion warnings in c++


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 Wconversion. As far as I can tell there's no required diagnostic for this in C++, though I could have missed it.

So, either a) did I miss something? or b) any objections to conditionalizing the warnings on Wconversion (or some method of turning them off)?

-eric


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