aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-03-28 05:42:02 -0400
committerTrevor Saunders <tbsaunde+binutils@tbsaunde.org>2016-06-01 21:19:53 -0400
commitd05584d3eeab4cb1c1d85d8dfdfef56827e03b3d (patch)
tree178edcf972f779ee79576c23aff1892c73277556 /gas
parent5e429f4cdcf2e0bf12309c843ffb3b2619bcb287 (diff)
downloadgdb-d05584d3eeab4cb1c1d85d8dfdfef56827e03b3d.zip
gdb-d05584d3eeab4cb1c1d85d8dfdfef56827e03b3d.tar.gz
gdb-d05584d3eeab4cb1c1d85d8dfdfef56827e03b3d.tar.bz2
xtensa: typedef enums when defining them
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/xtensa-relax.h16
2 files changed, 11 insertions, 10 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0dcdcef..ff6adf3 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
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
macro.
diff --git a/gas/config/xtensa-relax.h b/gas/config/xtensa-relax.h
index 0bad423..6458579 100644
--- a/gas/config/xtensa-relax.h
+++ b/gas/config/xtensa-relax.h
@@ -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
{