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] | |
For this testcase:
void g(const unsigned char b)
{
unsigned short c = b & 0xff;
}
we get:
wconversion-3.c:3: warning: conversion to 'unsigned char' from 'int'
may alter its value
wconversion-3.c:3: warning: conversion to 'short unsigned int' from
'int' may alter its value
Really weird... It is the same in both C and C++.
Manu.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |