gdbserver/tracepoint.c: make exported IPA global int instead of enum
authorPedro Alves <palves@redhat.com>
Mon, 9 Mar 2015 11:58:10 +0000 (11:58 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 6 Aug 2015 16:44:08 +0000 (17:44 +0100)
Fixes another C++ -fpermissive error:

  src/gdb/gdbserver/tracepoint.c:4535:21: error: invalid conversion from ‘int’ to ‘eval_result_type’ [-fpermissive]
    expr_eval_result = ipa_expr_eval_result;

gdb/gdbserver/ChangeLog:
2015-08-06  Pedro Alves  <palves@redhat.com>

* tracepoint.c (expr_eval_result): Now an int.

gdb/gdbserver/ChangeLog
gdb/gdbserver/tracepoint.c

index 5f0841779fc3f5638481eb1f8268bca5575f6783..4f64e43cbcbfac14dfd6b3438e1557fc47221727 100644 (file)
@@ -1,3 +1,7 @@
+2015-08-06  Pedro Alves  <palves@redhat.com>
+
+       * tracepoint.c (expr_eval_result): Now an int.
+
 2015-08-06  Pedro Alves  <palves@redhat.com>
 
        * gdbthread.h (struct regcache): Forward declare.
index e1c4a45aced84264fb111a4e2090e4e90f4c87ce..4455084e7e10f0bc6b14a263f81c6ec13258857a 100644 (file)
@@ -848,7 +848,10 @@ IP_AGENT_EXPORT_VAR int trace_buffer_is_full;
 
 /* The first error that occurred during expression evaluation.  */
 
-IP_AGENT_EXPORT_VAR enum eval_result_type expr_eval_result = expr_eval_no_error;
+/* Stored as an int to avoid the IPA ABI being dependent on whatever
+   the compiler decides to use for the enum's underlying type.  Holds
+   enum eval_result_type values.  */
+IP_AGENT_EXPORT_VAR int expr_eval_result = expr_eval_no_error;
 
 EXTERN_C_POP