diff options
author | Chen Gang <gang.chen.5i5j@gmail.com> | 2015-09-05 16:02:08 +0800 |
---|---|---|
committer | Chen Gang <gang.chen.5i5j@gmail.com> | 2015-09-08 21:43:35 +0800 |
commit | dce55a03c1cd7205cb8157f7cc80c76073d86047 (patch) | |
tree | f5dae401180d27fc995a5376969f9d5a0d9d6cd7 /gas | |
parent | 5707d2add464b6787ec615825e00b2407ba8a82b (diff) | |
download | gdb-dce55a03c1cd7205cb8157f7cc80c76073d86047.zip gdb-dce55a03c1cd7205cb8157f7cc80c76073d86047.tar.gz gdb-dce55a03c1cd7205cb8157f7cc80c76073d86047.tar.bz2 |
config/tc-avr.c (md_section_align): Append UL for -1 to avoid the latest gcc's warning
The related warning is:
gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/gas -I. -I../../binutils-gdb/gas -I../bfd -I../../binutils-gdb/gas/config -I../../binutils-gdb/gas/../include -I../../binutils-gdb/gas/.. -I../../binutils-gdb/gas/../bfd -DLOCALEDIR="\"/upstream/release-avr32/share/locale\"" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I../../binutils-gdb/gas/../zlib -g -O2 -MT tc-avr.o -MD -MP -MF .deps/tc-avr.Tpo -c -o tc-avr.o `test -f 'config/tc-avr.c' || echo '../../binutils-gdb/gas/'`config/tc-avr.c
../../binutils-gdb/gas/config/tc-avr.c: In function ‘md_section_align’:
../../binutils-gdb/gas/config/tc-avr.c:1233:43: error: left shift of negative value [-Werror=shift-negative-value]
return ((addr + (1 << align) - 1) & (-1 << align));
^
2015-09-05 Chen Gang <gang.chen.5i5j@gmail.com>
* config/tc-avr.c (md_section_align): Append UL for -1 to avoid
the latest gcc's warning.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-avr.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2dc9742..c0fb096 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2015-09-05 Chen Gang <gang.chen.5i5j@gmail.com> + + * config/tc-avr.c (md_section_align): Append UL for -1 to avoid + the latest gcc's warning. + 2015-08-27 Alan Modra <amodra@gmail.com> PR gas/18581 diff --git a/gas/config/tc-avr.c b/gas/config/tc-avr.c index c69a91c..09eea48 100644 --- a/gas/config/tc-avr.c +++ b/gas/config/tc-avr.c @@ -1230,7 +1230,7 @@ valueT md_section_align (asection *seg, valueT addr) { int align = bfd_get_section_alignment (stdoutput, seg); - return ((addr + (1 << align) - 1) & (-1 << align)); + return ((addr + (1 << align) - 1) & (-1UL << align)); } /* If you define this macro, it should return the offset between the |