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: -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


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