[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