[binutils-gdb] gas/expr.h fixme

Alan Modra amodra@sourceware.org
Tue Sep 16 01:32:32 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48a3ce61a011f03ef4308bb33fe754172bf982fc

commit 48a3ce61a011f03ef4308bb33fe754172bf982fc
Author: Alan Modra <amodra@gmail.com>
Date:   Sun Sep 14 22:49:51 2025 +0930

    gas/expr.h fixme
    
            * expr.h (expressionS): Adjust comments.  Use ENUM_BITFIELD
            for X_op.
            (enum operatorT): Define.

Diff:
---
 gas/expr.h | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/gas/expr.h b/gas/expr.h
index 2be3d69683c..8a8d58df8f5 100644
--- a/gas/expr.h
+++ b/gas/expr.h
@@ -37,7 +37,7 @@
 
    NOTE: This enumeration must match the op_rank array in expr.c.  */
 
-typedef enum
+typedef enum operatorT
 {
   /* An illegal expression.  */
   O_illegal,
@@ -122,14 +122,8 @@ typedef struct expressionS
   /* A number to add.  */
   offsetT X_add_number;
 
-  /* The type of the expression.  We can't assume that an arbitrary
-     compiler can handle a bitfield of enum type.  FIXME: We could
-     check this using autoconf.  */
-#ifdef __GNUC__
-  operatorT X_op : 8;
-#else
-  unsigned char X_op;
-#endif
+  /* The type of the expression.  */
+  ENUM_BITFIELD (operatorT) X_op : 8;
 
   /* Non-zero if the expression value should be regarded as unsigned.  This is
      only valid for
@@ -145,9 +139,7 @@ typedef struct expressionS
      signed word.  */
   unsigned int X_extrabit : 1;
 
-  /* 7 additional bits can be defined if needed.  */
-
-  /* Machine dependent field */
+  /* Machine dependent field.  */
   unsigned short X_md;
 } expressionS;


More information about the Binutils-cvs mailing list