[PATCH] Prevent warning in pldd

Carlos O'Donell carlos@systemhalted.org
Mon Apr 16 18:18:00 GMT 2012


On Mon, Apr 16, 2012 at 1:04 PM, Marek Polacek <polacek@redhat.com> wrote:
> After introducing static_assert in assert.h, GCC now issues a warning:
>
> pldd-xx.c:26:0: warning: "static_assert" redefined [enabled by default]
> ../assert/assert.h:119:0: note: this is the location of the previous definition
>
> We can circumvent this by e.g. renaming "static_assert" in pldd-xx.c
> to something that won't clash with assert.h.  Regtested on x86_64-linux,
> builded with both GCC 4.6.3 and 4.8, ok for trunk?
>
> 2012-04-16  Marek Polacek  <polacek@redhat.com>
>
>        * elf/pldd-xx.c: Rename static_assert to pldd_assert.
>

Right, ISO C11 has taken static_assert, so we need to use another name.

This looks good to me.

Cheers,
Carlos.



More information about the Libc-alpha mailing list