This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [v2,2/2] Function attributes: use shorter versions of the format macros
- From: Pedro Alves <palves at redhat dot com>
- To: Cleber Rosa <crosa at redhat dot com>, gdb-patches at sourceware dot org
- Cc: sergiodj at redhat dot com, lmr at redhat dot com, brobecker at adacore dot com
- Date: Fri, 12 Dec 2014 11:51:35 +0000
- Subject: Re: [v2,2/2] Function attributes: use shorter versions of the format macros
- Authentication-results: sourceware.org; auth=none
- References: <20141203103111 dot GB7899 at adacore dot com> <1418323840-2496-1-git-send-email-crosa at redhat dot com> <1418323840-2496-2-git-send-email-crosa at redhat dot com>
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 <rth@tamu.edu>
...
* 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