Define enum out of the scope of struct
authorYao Qi <yao.qi@linaro.org>
Thu, 19 Nov 2015 13:58:29 +0000 (13:58 +0000)
committerYao Qi <yao.qi@linaro.org>
Thu, 19 Nov 2015 14:01:03 +0000 (14:01 +0000)
This patch moves the enum definition out of the scope of struct, and
fixes the following error.

gdb/gdbserver/linux-aarch64-low.c:681:18: error: 'OPERAND_REGISTER' was not declared in this scope
   operand.type = OPERAND_REGISTER;
                  ^
gdb/gdbserver:

2015-11-19  Yao Qi  <yao.qi@linaro.org>

* linux-aarch64-low.c (enum aarch64_operand_type): New.
(struct aarch64_operand): Move enum out.

gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-aarch64-low.c

index 0e3d67363651075952a81f0c2a225248ca21bb85..183f8a9b57f8fb4aa09f48e6b6f0f099594ffe33 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-19  Yao Qi  <yao.qi@linaro.org>
+
+       * linux-aarch64-low.c (enum aarch64_operand_type): New.
+       (struct aarch64_operand): Move enum out.
+
 2015-11-19  Yao Qi  <yao.qi@linaro.org>
 
        * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
index a145f80bb4a5702b7956561320756e36061f77ba..7cd9b77e1a30d65e9c5dbaacab48633aedf0d29b 100644 (file)
@@ -614,17 +614,20 @@ enum aarch64_condition_codes
   LE = 0xd,
 };
 
+enum aarch64_operand_type
+{
+  OPERAND_IMMEDIATE,
+  OPERAND_REGISTER,
+};
+
 /* Representation of an operand.  At this time, it only supports register
    and immediate types.  */
 
 struct aarch64_operand
 {
   /* Type of the operand.  */
-  enum
-    {
-      OPERAND_IMMEDIATE,
-      OPERAND_REGISTER,
-    } type;
+  enum aarch64_operand_type type;
+
   /* Value of the operand according to the type.  */
   union
     {