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


On 14/01/07, Paolo Carlini <pcarlini@suse.de> wrote:
Hi Manuel,


Well, just have a look to Gerald' examples: it's old HP / SGI STL code, we are assigning / initializing a size_t from a pointer difference, or arithmetic, more generally. There are quite a few instances of the issue, beyond that pointed out by Gerald. Certainly, the HP / SGI engineers considered those assignment harmless, and I respect that kind of assessment, but on the other hand, at the time the compilers were probably weaker at warning, I'm not sure.

:-( But I need a reason to avoid warning and a way to detect that the implicit conversion is harmless. For example, someone may think that int i = 1.2 is harmless in their code but the whole point of Wconversion is to warn about this.

I cannot help you without some help...

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

The casts should avoid the warnings and using Wno-conversion also. But still I would like to solve the issue, if there is one, rather than work-around it.

Cheers,

Manuel.


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