[patch,avr,committed] Fix build warnings caused by REG_CLASS_CONTENTS

Georg-Johann Lay avr@gjlay.de
Wed May 14 11:09:00 GMT 2014


https://gcc.gnu.org/r210418

Applied this patch in order to fixed build warnings like these

gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-1073741824’ from ‘int’ 
to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-268435456’ from ‘int’ 
to ‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-67108864’ from ‘int’ to 
‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-16777216’ from ‘int’ to 
‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]
gcc/reginfo.c:115:5: warning: narrowing conversion of ‘-65536’ from ‘int’ to 
‘const unsigned int’ inside { } is ill-formed in C++11 [-Wnarrowing]

on I32 hosts that are caused by expressions like 3 << 30 in REG_CLASS_CONTENTS 
initializer.

Johann

	* config/avr/avr.h (REG_CLASS_CONTENTS): Use unsigned suffix for
	 shifted values to avoid build warning.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn-narrowing.diff
Type: text/x-patch
Size: 1703 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140514/6221c656/attachment.bin>


More information about the Gcc-patches mailing list