This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] PR c++/17494 - Fix evaluation of method calls under EVAL_SKIP
- From: Alan Modra <amodra at gmail dot com>
- To: Siva Chandra <sivachandra at google dot com>
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 5 Nov 2014 10:54:16 +1030
- Subject: Re: [PATCH] PR c++/17494 - Fix evaluation of method calls under EVAL_SKIP
- Authentication-results: sourceware.org; auth=none
- References: <CAGyQ6gxnfw6yRmMzGG2T5acqO2od7WL7-8F1wVRTp9mfNvg9Sg at mail dot gmail dot com> <201411031508 dot sA3F815b024788 at d06av02 dot portsmouth dot uk dot ibm dot com> <CAGyQ6gwSMuFpcM8J1fyE=PzruzSLb8kRKx30H0LkrA-VDT4p3Q at mail dot gmail dot com>
On Mon, Nov 03, 2014 at 06:08:15PM -0800, Siva Chandra wrote:
> >> PR c++/17494
> >> * eval.c (evaluate_subexp_standard): Evaluate the "object" and
> >> the method args also under EVAL_SKIP when evaluating method
> >> calls under EVAL_SKIP.
>
> Thanks for the review. Pushed: e0f52461c2467b6610391681fa27cd9b3c5def57
After this patch, when using gcc-4.9.1 and gcc-5.0 (20140911) I see
what looks to me to be nonsense errors (ie. I'd suspect a compiler
bug). Does anyone else see the same? Nothing special in configure
options, x86_64-linux.
/src/binutils-gdb/gdb/eval.c: In function âevaluate_subexp_standardâ:
/src/binutils-gdb/gdb/eval.c:745:16: error: âretâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
struct value *ret = NULL;
^
In file included from /src/binutils-gdb/gdb/common/common-defs.h:49:0,
from /src/binutils-gdb/gdb/defs.h:28,
from /src/binutils-gdb/gdb/eval.c:20:
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: error: âbufâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: note: âbufâ was declared here
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/eval.c:747:2: note: in expansion of macro âTRY_CATCHâ
TRY_CATCH (ex, RETURN_MASK_ERROR)
^
/src/binutils-gdb/gdb/eval.c:1429:19: error: âvalueâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
struct value *value = NULL;
^
In file included from /src/binutils-gdb/gdb/common/common-defs.h:49:0,
from /src/binutils-gdb/gdb/defs.h:28,
from /src/binutils-gdb/gdb/eval.c:20:
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: error: âbufâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: note: âbufâ was declared here
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/eval.c:1430:5: note: in expansion of macro âTRY_CATCHâ
TRY_CATCH (except, RETURN_MASK_ERROR)
^
/src/binutils-gdb/gdb/eval.c:1846:18: error: âvalueâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
struct value *value = NULL;
^
In file included from /src/binutils-gdb/gdb/common/common-defs.h:49:0,
from /src/binutils-gdb/gdb/defs.h:28,
from /src/binutils-gdb/gdb/eval.c:20:
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: error: âbufâ may be used uninitialized in this function [-Werror=maybe-uninitialized]
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/common/common-exceptions.h:148:20: note: âbufâ was declared here
SIGJMP_BUF *buf = \
^
/src/binutils-gdb/gdb/eval.c:1847:4: note: in expansion of macro âTRY_CATCHâ
TRY_CATCH (except, RETURN_MASK_ERROR)
^
cc1: all warnings being treated as errors
--
Alan Modra
Australia Development Lab, IBM