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

Re: Request for warnings on implicit bool to int conversions


Am 2012-03-28 00:43, schrieb mathog:
The C99 bool data type, and the similar type in C++, currently (v 4.5.2)
do not generate
warnings for any of these sorts of operations:

bool b;

b = 3;
b++;
b += 2;
if(b == 3)

The last one is PR 44077.


Franz


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