This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wconversion versus libstdc++
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: gdr at cs dot tamu dot edu (Gabriel Dos Reis)
- Cc: lopezibanez at gmail dot com (Manuel López-Ibáñez), pcarlini at suse dot de (Paolo Carlini), Joe dot Buck at synopsys dot com (Joe Buck), gerald at pfeifer dot com (Gerald Pfeifer), gcc at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, joseph at codesourcery dot com (Joseph S. Myers)
- Date: Wed, 17 Jan 2007 20:47:29 -0500 (EST)
- Subject: Re: -Wconversion versus libstdc++
>
> One use of -Wconversion is to draw attention to
>
> int x = 2.3; // warning: be careful, is this what you want?
> // this is a potential bug as it is value altering.
>
> and in an upcoming revision to C++, it is very likely that implicit
> conversion that may lose information are just banned outright, see
>
> http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2006/n2100.pdf
>
> section "7.1 Can we ban narrowing for T{v}?" on page 27, which
> was welcomed at the last C++ committee meeting (at my own surprise, I
> must confess, as the committee tends to be conservative).
The union between C and C++, just became smaller and I don't think C++
should be named C++ anymore then. It really needs a rename if this
baning of narrowing goes through.
-- Pinski