Manuel López-Ibáñez writes:
> 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++.
Please read http://gcc.gnu.org/wiki/NewWconversion. Please come back
if you have any further questions.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903