]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
xtensa: typedef enums when defining them
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Mon, 28 Mar 2016 09:42:02 +0000 (05:42 -0400)
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>
Thu, 2 Jun 2016 01:19:53 +0000 (21:19 -0400)
I think this is the more typical way to do this.  Its also slightly shorter and
less repeditive.

gas/ChangeLog:

2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>

* config/xtensa-relax.h: Move typedefs of enums to the enums
definition.

gas/ChangeLog
gas/config/xtensa-relax.h

index 0dcdcef37da52ec70ee3334f74f0fcbc3f642a91..ff6adf32781c553b8d9ba8e193888c733427097b 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
+
+       * config/xtensa-relax.h: Move typedefs of enums to the enums
+       definition.
+
 2016-06-01  Trevor Saunders  <tbsaunde+binutils@tbsaunde.org>
 
        * config/tc-ns32k.c (bit_fix_new): Replace obstack-alloc with XOBNEW
index 0bad4239482f374babf08adeff7936b176e9e23c..64585798634d18a818c73bee9c24a55b85fb073b 100644 (file)
@@ -91,10 +91,7 @@ struct req_or_option_list
 
 /* Operand types and constraints on operands:  */
 
-typedef enum op_type OpType;
-typedef enum cmp_op CmpOp;
-
-enum op_type
+typedef enum op_type
 {
   OP_CONSTANT,
   OP_OPERAND,
@@ -107,13 +104,13 @@ enum op_type
   OP_LITERAL,
   OP_FREEREG,
   OP_LABEL
-};
+} OpType;
 
-enum cmp_op
+typedef enum cmp_op
 {
   OP_EQUAL,
   OP_NOTEQUAL,
-};
+} CmpOp;
 
 struct precondition
 {
@@ -143,14 +140,13 @@ struct build_op
 };
 
 typedef struct build_instr BuildInstr;
-typedef enum instr_type InstrType;
 
-enum instr_type
+typedef enum instr_type
 {
   INSTR_INSTR,
   INSTR_LITERAL_DEF,
   INSTR_LABEL_DEF
-};
+} InstrType;
 
 struct build_instr
 {