This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Go patch committed: Fix error reporting for invalid builtin calls
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Ian Lance Taylor <iant at golang dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, "gofrontend-dev at googlegroups dot com" <gofrontend-dev at googlegroups dot com>, msebor at redhat dot com
- Date: Mon, 3 Aug 2015 13:15:16 +0200
- Subject: Re: Go patch committed: Fix error reporting for invalid builtin calls
- Authentication-results: sourceware.org; auth=none
- References: <CAOyqgcWiyEUxd38c+iNyQob-rxOpsqN+LORy2sgQKxd074wMtg at mail dot gmail dot com> <mvmh9og3fh2 dot fsf at hawking dot suse dot de>
On Mon, Aug 3, 2015 at 11:10 AM, Andreas Schwab <schwab@suse.de> wrote:
> Ian Lance Taylor <iant@golang.org> writes:
>
>> This patch from Chris Manghane fixes the Go frontend error reporting
>> for invalid builtin calls, by not losing track of whether the call is
>> erroneous. This fixes https://golang.org/issue/11561. Bootstrapped
>> and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to
>> mainline.
>
> ../../../libgo/runtime/mprof.goc: In function 'runtime_Stack':
> ../../../libgo/runtime/mprof.goc:408:5: error: calling '__builtin_frame_address' with a nonzero argument is unsafe [-Werror=frame-address]
> sp = runtime_getcallersp(&b);
> ^
Introduced by Martin Sebors patch
2015-08-02 Martin Sebor <msebor@redhat.com>
* c-family/c.opt (-Wframe-address): New warning option.
* doc/invoke.texi (Wframe-address): Document it.
* doc/extend.texi (__builtin_frame_address, __builtin_return_address):
Clarify possible effects of calling the functions with non-zero
arguments and mention -Wframe-address.
* builtins.c (expand_builtin_frame_address): Handle -Wframe-address.
Richard.
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."