X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=nWGbSlikIzKftn4tXG2rXhDsjvCOzMc1LBDRP7zKv9M=; b=gKiS6ZBACgXTJKjtP3FEaULpi45a2EndX6+COgaTyGuIzJ/xqGjzeA89Xy7THJ2pCY LkkDrQnETup/zKmVNJUd/Yf/4zzk1QP7vOn6AeDz+MZdSriH6dEHS489EmE6PKH5iB9p o4trxTNnvvmP+Y+5JnaQbMe1nP/VpY6yxGrCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mGVuWL2Rk91Un8aVM2WdaOeQCF3x1sazilsinxphcCRw/5W74+A4pB6u5g2zeCOVE0 OPAmyqXRzejs1qlsny1Co0Fn8TbyWUR5OlS1VtTYvqjv/zQImQKgKfR1I6vHXZlLwp03 qGzzEUbiDOYZ3z0F+vCtlPikECGc9Frbd0bMg= MIME-Version: 1.0 In-Reply-To: <83ljqa410g.fsf@gnu.org> References: <647fe9b10904082358r38772fcco8708468aa931f5a2 AT mail DOT gmail DOT com> <83ljqa410g DOT fsf AT gnu DOT org> Date: Thu, 9 Apr 2009 12:49:56 +0300 Message-ID: <647fe9b10904090249t43ddbc2at6bbe48cdaf129f0b@mail.gmail.com> Subject: Re: [PATCH] dbgcom.c, attribute patch From: Ozkan Sezer To: Eli Zaretskii Cc: djgpp-workers AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 4/9/09, Eli Zaretskii wrote: > > Date: Thu, 9 Apr 2009 09:58:31 +0300 > > From: Ozkan Sezer > > > > > src/debug/common/dbgcom.c: __attribute__((used)) for static data is OK > > for gcc-3.3, too, not just for gcc >= 3.4. Patch attached, please consider > > for applying. > > > Thanks, but why did you make these patches so unnecessarily complex? > The C #if preprocessor directive allows arbitrary boolean expressions, Oh, it's just a result of copy+paste of my local version which, in turn, was inspired by compiler.h of linux kernel-2.4. > not just a single symbol. Also, what is the purpose of renaming > __attribute_used into __used? > > So I would suggest this instead: > > > --- dbgcom.c.orig 2009-04-09 12:38:53.687500000 +0300 > +++ dbgcom.c 2009-04-09 12:38:22.312500000 +0300 > @@ -35,8 +35,10 @@ > #include > #include > > -#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)) > +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) > # define __attribute_used __attribute__ ((__used__)) > +#elif __GNUC__ >= 2 > +# define __attribute_used __attribute__((__unused__)) > #else > # define __attribute_used > #endif > > Does this work for you? > Surely. Change is fine by me. -- Ozkan Sezer