This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
implicit cast from unsigned long to unsigned int gives no warning with -Wall (64 bits arch)
- From: Vincent Torri <vtorri at univ-evry dot fr>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 21 Nov 2007 19:15:39 +0100 (CET)
- Subject: implicit cast from unsigned long to unsigned int gives no warning with -Wall (64 bits arch)
hey,
I have an ubuntu 64 bits on my core 2 duo. gcc version is 4.1.2
I compile that code with -Wall:
unsigned int htonl (unsigned int i)
{
i = 0;
return 0;
}
int
main ()
{
unsigned long i;
unsigned int j;
i = 0;
j = htonl (i);
return 0;
}
but no warning is given
Is it normal ?
thank you
Vincent Torri