A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-October/039059.html below:

[Python-Dev] New warnings in _sre.c

[Python-Dev] New warnings in _sre.cTim Peters tim.one at comcast.net
Mon Oct 20 10:15:40 EDT 2003
MSVC complains when a signed int is compared to an unsigned int.  I'm glad
it does, because the compiler silently casts the signed int to unsigned,
which doesn't do what the author probably intended if the signed int is less
than 0:

#include <stdio.h>

void main()
{
	int i = -1;
	unsigned int j = 0;
	printf("%d\n", i < j);
}

That prints 0, i.e. it is not the case that -1 < 0U.

_sre.c(852) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1021) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1035) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1109) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1131) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1192) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1230) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1267) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1285) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1287) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1294) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1314) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1344) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1362) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1384) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1476) : warning C4018: '<' : signed/unsigned mismatch
_sre.c(1492) : warning C4018: '<' : signed/unsigned mismatch


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4