This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libiberty, libcpp]: Introduce xvasprintf to libiberty and use it in libcpp
- From: Ian Lance Taylor <iant at google dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Joseph Myers <joseph at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 10 Dec 2014 16:53:28 -0800
- Subject: Re: [PATCH, libiberty, libcpp]: Introduce xvasprintf to libiberty and use it in libcpp
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4aW_1fc7Zjoyntcs-FTpXepbhkzJEHW6upMNZGAcPKJ9w at mail dot gmail dot com>
On Wed, Dec 10, 2014 at 12:17 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> libiberty/ChangeLog:
>
> 2014-12-10 Uros Bizjak <ubizjak@gmail.com>
> Ben Elliston <bje@au.ibm.com>
> Manuel Lopez-Ibanez <manu@gcc.gnu.org>
>
> * xvasprintf.c: New file.
> * vprintf-support.h: Likewise.
> * vprintf-support.c: Likewise.
> * Makefile.in (CFILES): Add vprintf-support.c, xvasprintf.c.
> (REQUIRED_OFILES): Add vprintf-support.$(objext), xvasprintf.$(objext).
> (vprintf-support.$(objext), xvasprintf.$(objext)): New targets.
> * functions.texi: Updated with documentation for xvasprintf.
> * vasprintf.c (int_vasprintf): Use libiberty_vprintf_buffer_size.
>
> include/ChangeLog:
>
> 2014-12-10 Uros Bizjak <ubizjak@gmail.com>
> Ben Elliston <bje@au.ibm.com>
> Manuel Lopez-Ibanez <manu@gcc.gnu.org>
>
> * libiberty.h (xvasprintf): Declare.
>
> libcpp/ChangeLog:
>
> 2014-12-10 Uros Bizjak <ubizjak@gmail.com>
>
> * directives.c (cpp_define_formatted): Use xvasprintf.
>
> Bootstrapped without warning on x86_64-linux-gnu and alphaev68-linux-gnu.
>
> OK for mainline?
> +extern char * xvasprintf (const char *, va_list) ATTRIBUTE_MALLOC ATTRIBUTE_PRINTF(1,0);
No space after '*' -- see other declarations in the file.
> + char * result;
No space after '*'.
+ int total_width = libiberty_vprintf_buffer_size (format, args);
Only one space after '='.
The libiberty/include patches are OK with those changes.
Thanks.
Ian