This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
conversion warnings in c++
- From: Eric Christopher <echristo at apple dot com>
- To: gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Wed, 11 Jan 2006 17:35:43 -0800
- Subject: 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