bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/27283] New: gas for alpha fails to build with gcc 11


From: belyshev at depni dot sinp.msu.ru
Subject: [Bug gas/27283] New: gas for alpha fails to build with gcc 11
Date: Sat, 30 Jan 2021 10:05:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27283

            Bug ID: 27283
           Summary: gas for alpha fails to build with gcc 11
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: belyshev at depni dot sinp.msu.ru
  Target Milestone: ---

A new warning in GCC 11 triggers -Werror build failure in gas targeted for
alpha:

x86_64-pc-linux-gnu-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="\"/usr/local/share/locale\""  -W
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144
-Werror -Wwrite-strings -I../../binutils-gdb/gas/../zlib -g -O2 -MT
config/tc-alpha.o -MD -MP -MF $depbase.Tpo -c -o config/tc-alpha.o
../../binutils-gdb/gas/config/tc-alpha.c &&\
mv -f $depbase.Tpo $depbase.Po
../../binutils-gdb/gas/config/tc-alpha.c: In function 'insert_operand':
../../binutils-gdb/gas/config/tc-alpha.c:1978:21: error: comparison is always
true due to limited range of data type [-Werror=type-limits]
 1978 |   if (operand->bits != 32 && !(operand->flags &
AXP_OPERAND_NOOVERFLOW))
      |                     ^~

Code in question is buggy since 2001:

+2001-09-04  Richard Henderson  <rth@redhat.com>
+
+       * alpha.h (struct alpha_operand): Pack elements into bitfields.
+

...

diff --git a/include/opcode/alpha.h b/include/opcode/alpha.h
index 6f31e9ae09c..487b69605a3 100644
--- a/include/opcode/alpha.h
+++ b/include/opcode/alpha.h
@@ -81,16 +81,16 @@ extern const unsigned alpha_num_opcodes;
 struct alpha_operand
 {
   /* The number of bits in the operand.  */
-  int bits;
+  unsigned int bits : 5;

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]