From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17054 invoked by alias); 11 Apr 2014 07:03:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17042 invoked by uid 89); 11 Apr 2014 07:03:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pd0-f180.google.com Received: from mail-pd0-f180.google.com (HELO mail-pd0-f180.google.com) (209.85.192.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 11 Apr 2014 07:03:33 +0000 Received: by mail-pd0-f180.google.com with SMTP id v10so4942687pde.11 for ; Fri, 11 Apr 2014 00:03:31 -0700 (PDT) X-Received: by 10.66.180.200 with SMTP id dq8mr25336085pac.104.1397199811359; Fri, 11 Apr 2014 00:03:31 -0700 (PDT) Received: from [192.168.1.35] (76-253-2-104.lightspeed.sntcca.sbcglobal.net. [76.253.2.104]) by mx.google.com with ESMTPSA id yv7sm31439471pac.33.2014.04.11.00.03.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Apr 2014 00:03:30 -0700 (PDT) References: Mime-Version: 1.0 (1.0) In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <72F37201-EB97-4175-B915-F1D4F094F80D@gmail.com> Cc: "gdb-patches@sourceware.org" , Eric Christopher , Doug Evans From: pinskia@gmail.com Subject: Re: [patch] Fix unused static symbols so they're not dropped by clang Date: Fri, 11 Apr 2014 07:03:00 -0000 To: David Blaikie X-IsSubscribed: yes X-SW-Source: 2014-04/txt/msg00197.txt.bz2 > On Apr 10, 2014, at 11:51 PM, David Blaikie wrote: >=20 > Several tests used file-static functions and variables that were not > referenced by the code. Even at -O0, clang omits these entities at the > frontend so the tests fail. I think clang should change here rather than the testsuite of gdb. Unused s= tatic functions make sense to be kept around at -O0 for debugging reasons.= =20 Thanks, Andrew >=20 > Since it doesn't look like these tests needed this functionality for > what they were testing, I've modified the variables/functions to > either be non-static, or marked them with __attribute__((used)). >=20 > If it's preferred that I use the attribute more pervasively, rather > than just making the entities non-static, I can provide a patch for > that (or some other preferred solution). There's certainly precedent > for both (non-static entities and __attribute__((used)) in the > testsuite already and much more of the former than the latter). >=20 > I have commit-after-review access, so just looking for sign-off here. >=20 > Thanks, > - David >