From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69780 invoked by alias); 3 Aug 2015 11:15:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 69759 invoked by uid 89); 3 Aug 2015 11:15:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f172.google.com Received: from mail-ig0-f172.google.com (HELO mail-ig0-f172.google.com) (209.85.213.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 11:15:19 +0000 Received: by igbpg9 with SMTP id pg9so69558152igb.0 for ; Mon, 03 Aug 2015 04:15:17 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.50.130 with SMTP id c2mr21364458igo.32.1438600516945; Mon, 03 Aug 2015 04:15:16 -0700 (PDT) Received: by 10.107.32.140 with HTTP; Mon, 3 Aug 2015 04:15:16 -0700 (PDT) In-Reply-To: References: Date: Mon, 03 Aug 2015 11:15:00 -0000 Message-ID: Subject: Re: Go patch committed: Fix error reporting for invalid builtin calls From: Richard Biener To: Andreas Schwab Cc: Ian Lance Taylor , gcc-patches , "gofrontend-dev@googlegroups.com" , msebor@redhat.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00045.txt.bz2 On Mon, Aug 3, 2015 at 11:10 AM, Andreas Schwab wrote: > Ian Lance Taylor 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 * 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."