Re: warning: conversion from ‘int’ to ‘char’ may change value

2018-09-17 Thread Martin Sebor
On 09/17/2018 06:00 AM, Umesh Kalappa wrote: Hi All, When we try to compile the below case from trunk gcc we get the below warning (-Wconversion) i.e void start(void) { char n = 1; char n1 = 0x01; n &= ~n1; } $xgcc -S warn.c -nostdinc -Wconversion warning: conversion from ‘int’ to ‘char’

Re: warning: conversion from ‘int’ to ‘char’ may change value

2018-09-17 Thread David Brown
On 17/09/18 14:00, Umesh Kalappa wrote: > Hi All, > > When we try to compile the below case from trunk gcc we get the below > warning (-Wconversion) i.e > > void start(void) { > char n = 1; > char n1 = 0x01; > n &= ~n1; > } > > $xgcc -S warn.c -nostdinc -Wconversion > warning: conversion f

warning: conversion from ‘int’ to ‘char’ may change value

2018-09-17 Thread Umesh Kalappa
Hi All, When we try to compile the below case from trunk gcc we get the below warning (-Wconversion) i.e void start(void) { char n = 1; char n1 = 0x01; n &= ~n1; } $xgcc -S warn.c -nostdinc -Wconversion warning: conversion from ‘int’ to ‘char’ may change value [-Wconversion] n &= ~n1;