From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9029 invoked by alias); 12 Dec 2014 11:51:44 -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 8948 invoked by uid 89); 12 Dec 2014 11:51:43 -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,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 12 Dec 2014 11:51:42 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBCBpcrt004534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 12 Dec 2014 06:51:38 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBCBpapF009892; Fri, 12 Dec 2014 06:51:37 -0500 Message-ID: <548AD6C7.1000205@redhat.com> Date: Fri, 12 Dec 2014 11:51:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Cleber Rosa , gdb-patches@sourceware.org CC: sergiodj@redhat.com, lmr@redhat.com, brobecker@adacore.com Subject: Re: [v2,2/2] Function attributes: use shorter versions of the format macros References: <20141203103111.GB7899@adacore.com> <1418323840-2496-1-git-send-email-crosa@redhat.com> <1418323840-2496-2-git-send-email-crosa@redhat.com> In-Reply-To: <1418323840-2496-2-git-send-email-crosa@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-12/txt/msg00272.txt.bz2 On 12/11/2014 06:50 PM, Cleber Rosa wrote: > glibc provides a wide range of function attributes that can help GCC during > code compilation. > > One step further, glibc also provides in /usr/include/ansidecl.h a generic > version of a macro called ATTRIBUTE_PRINTF, based on the format function > attribute, and others that are more specific and shorter to write, read and > grasp. We have an ansidecl.h in gdb/../include/ that still says it's part of glibc, but the glibc copy AFAIK is long gone. Seems to have been removed in 1997: 1997-06-13 10:06 Richard Henderson ... * ansidecl.h: Removed. I don't have a /usr/include/ansidecl.h in my F20 system, nor do I see any ansidecl.h in the glibc sources. I'd guess your /usr/include/ansidecl.h file is really our/gcc's file, not glibc's. > > For consistency sake, let's use these shorter versions of those macros. Consistency with? You mean, consistency throughout? > > For more information: > * /usr/include/ansidecl.h > * https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-Wformat-2963 > > gdb/ChangeLog: > > * ada-lang.c (lim_warning): use shorter versions of function attributes > macros. Uppercase "use". > gdb/gdbserver/ChangeLog: > > * ax.c (ax_vdebug): use shorter versions of function attributes > macros. Likewise. The patch itself looks fine to me (too). Thanks, Pedro Alves