This is the mail archive of the gcc-help@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]

implicit cast from unsigned long to unsigned int gives no warning with -Wall (64 bits arch)


>From GCC 4.3 onwards you can use -Wconversion.

test.c: In function 'main':
test.c:16: warning: conversion to 'unsigned int' from 'long unsigned
int' may alter its value

Previous versions have a Wconversion option but it won't do what you
want even if you think it does. Read more here:
http://gcc.gnu.org/wiki/NewWconversion

Cheers,

Manuel.


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