diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-11-10 15:11:44 +0100 |
---|---|---|
committer | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2014-11-10 15:11:44 +0100 |
commit | b1f28d992c916eab861df3fa62d436755f874b62 (patch) | |
tree | e11a5f334c35e78dc3e6fdce7800dde11194e49e | |
parent | aceb5ff54262c4b03a11b95656e9080cfd23a9ef (diff) | |
download | gdb-b1f28d992c916eab861df3fa62d436755f874b62.zip gdb-b1f28d992c916eab861df3fa62d436755f874b62.tar.gz gdb-b1f28d992c916eab861df3fa62d436755f874b62.tar.bz2 |
Work around GCC bug 63748
A recent change to eval.c triggered a GCC bug that causes a false positive
"may be used uninitialized" warning in evaluate_subexp_standard. This seems
to be triggered by a specific CFG constructed via setjmp and gotos.
While the GCC bug is in the process of being fixed, there are released
compiler versions (in particular GCC 4.9) in the field that show this
problem. In order to allow compiling GDB with one of those compilers,
this commit slightly reworks the CFG (in an equivalent way) of the
affected function, so that the GCC bug is no longer triggered.
gdb/ChangeLog:
* eval.c (evaluate_subexp_standard): Work around GCC bug 63748.
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/eval.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0a8bee8..ea055da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-11-10 Ulrich Weigand <uweigand@de.ibm.com> + + * eval.c (evaluate_subexp_standard): Work around GCC bug 63748. + 2014-11-07 Pedro Alves <palves@redhat.com> * infrun.c (process_event_stop_test) <subroutine check>: Don't @@ -1696,8 +1696,6 @@ evaluate_subexp_standard (struct type *expect_type, do_call_it: - if (noside == EVAL_SKIP) - goto nosideret; if (argvec[0] == NULL) error (_("Cannot evaluate function -- may be inlined")); if (noside == EVAL_AVOID_SIDE_EFFECTS) @@ -1804,6 +1802,8 @@ evaluate_subexp_standard (struct type *expect_type, for (; tem <= nargs; tem++) argvec[tem] = evaluate_subexp_with_coercion (exp, pos, noside); argvec[tem] = 0; /* signal end of arglist */ + if (noside == EVAL_SKIP) + goto nosideret; goto do_call_it; default: |