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


Gerald Pfeifer wrote:

On Mon, 15 Jan 2007, Paolo Carlini wrote:


All in all, I think we can definitely add casts to the library, would be only
a few tens of lines worth of patch, I think. Whether the warning is useful to
the entire GCC community, I cannot say... But I hope we can resolve the issue
rather quickly, because, in case, I'd like to start the audit of the library
as soon as possible and be done with the issue as far as we are concerned...


Would it make sense to add these case in any case, regardless of what
we are going to do about the warning?

(My rationale is that this would document that we are aware of the potential issue there and our assessment showed that this particular
use is safe. But I may be wrong here...)


Personally, I agree.

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

Paolo.

(*) Before someone asks, a cursory look at the code reveals that probably we really need casts, not a different kind of rework: allocator::deallocate naturally takes an unsigned quantity.


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