help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with disabling warnings


From: Guy Harrison
Subject: Re: help with disabling warnings
Date: Wed, 18 Aug 2004 10:59:54 GMT
User-agent: KNode/0.7.7

John Qyindi wrote:

> The compilers are different and the other developer is not compiling
> with the -Wall argument... I think maybe the disable_warn pragma is
> from an earlier version of the compiler.  Anyhow most of the warnings
> come from the following type of code:
> 
> for( int i = 0; i < vec.size(); ++i )
> 
> it is complaining about comparing int to unsigned int.

The compiler is right to complain about that of course. Admittedly
"std::size_type" is a mouthful to type but can be typedef'd into something
shorter. Fwiw, I use "sd::sdSiz" - not too unwieldy in headers and in code
can often be subject to "using namespace sd" and just "sdSiz" usage. Perhaps
the author would be amenable to a change along those lines? Fwiw, "-W -Wall
-Werror" (and -ansi/-pedantic if applicable) are worthwhile goals to persue
(imho).

<curiosity factor>
"sd" prefix is my main machine name (couldn't think of anything better at
the time plus it's short) ;-)
</curiosity factor>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]