]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas/expr.h fixme
authorAlan Modra <amodra@gmail.com>
Sun, 14 Sep 2025 13:19:51 +0000 (22:49 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Sep 2025 01:17:17 +0000 (10:47 +0930)
* expr.h (expressionS): Adjust comments.  Use ENUM_BITFIELD
for X_op.
(enum operatorT): Define.

gas/expr.h

index 2be3d69683c0d3921dc9ba9ea3a9df5ebb47f2fe..8a8d58df8f5822c618816024e87c977563dca58a 100644 (file)
@@ -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;