This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, libiberty, libcpp]: Introduce xvasprintf to libiberty and use it in libcpp


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]