This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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++


On Mon, Jan 15, 2007 at 10:24:40AM -0600, Gabriel Dos Reis wrote:
> Paolo Carlini <pcarlini@suse.de> writes:
> 
> [...]
> 
> | Let's wait a bit more for other opinions, say one day or two, then I
> | will start the actual work. As far as I can see, other compilers do
> | not warn in such cases, and adding casts (*) isn't the cleanest
> | practice in the world, thus my caution...
> 
> I agree.  The casts will just paper over the problem, without solving it.

Let's keep in mind that if we have to do major work to shut up warnings
in the library, despite the system_header pragma, it's going to be loads
of fun for the distro folks to get all the packages to build that specify
-Werror.

In the case of the containers, we are asserting/relying on the fact that
the pointer difference is zero or positive.  But this has become a
widespread idiom: people write their own code in the STL style.  If STL
code now has to be fixed to silence warnings, so will a lot of user code.


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