On 27 September 2010 05:19, J Decker <d3c...@gmail.com> wrote:
>
> I don't know why standards left this open, other than there isn't a
> single-instruction translation from code to CPU for the comparison;
>
> But if it's not fixed, this warning should definatly be issued at
> default warning level.  This should be more like 'if this comparison
> can be wrong, it will be wrong'.

Please, see
http://c-faq.com/expr/preservingrules.html

The warnings that you want are Wsign-compare and Wsign-conversion.
They are not enabled by default because they produce a lot of false
positives:

http://gcc.gnu.org/wiki/NewWconversion#Frequently_Asked_Questions

Cheers,

Manuel.

Reply via email to