From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14115 invoked by alias); 18 Feb 2013 19:21:33 -0000 Received: (qmail 14086 invoked by uid 22791); 18 Feb 2013 19:21:30 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-qc0-f180.google.com (HELO mail-qc0-f180.google.com) (209.85.216.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Feb 2013 19:21:23 +0000 Received: by mail-qc0-f180.google.com with SMTP id v28so2240872qcm.11 for ; Mon, 18 Feb 2013 11:21:22 -0800 (PST) X-Received: by 10.49.104.136 with SMTP id ge8mr5612253qeb.8.1361215282470; Mon, 18 Feb 2013 11:21:22 -0800 (PST) Received: from anchor.twiddle.net (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPS id s6sm6307451qaz.13.2013.02.18.11.21.20 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 18 Feb 2013 11:21:21 -0800 (PST) Message-ID: <51227F2E.5060103@twiddle.net> Date: Mon, 18 Feb 2013 19:21:00 -0000 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Carlos O'Donell CC: Thomas Schwinge , libc-alpha@sourceware.org, libc-ports@sourceware.org Subject: Re: Usage of __attribute__used__ in (system) headers? References: <87r4khnbqm.fsf@kepler.schwinge.homeip.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00035.txt.bz2 On 02/18/2013 11:00 AM, Carlos O'Donell wrote: >> > static union { unsigned char __c[4]; float __d; } __nan_union >> > - __attribute_used__ = { __nan_bytes }; >> > + = { __nan_bytes }; >> > # define NAN (__nan_union.__d) >> > >> > #endif /* GCC. */ > I disagree, it's useful to mark the non-GCC version with > an __attribute_used__ such that in the future we might > use another compiler without problems. The annotation should not be attribute used at all, but rather unused. Used says that the object is referenced in some non-visible way by assembly, and thus cannot be elided. Unused says that we understand the variable may not be referenced, and don't warn; but do, in particular, remove it if it is unused. As for whether or not to annotate for non-GCC... I'm ok with either. r~