[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes |
Date: |
Wed, 20 Feb 2013 15:57:54 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Feb 20, 2013 at 03:50:11PM +0100, Laszlo Ersek wrote:
> On 02/20/13 12:31, Kevin Wolf wrote:
> > On Mon, Feb 18, 2013 at 05:56:57PM -0600, Anthony Liguori wrote:
> >> GTK won't build with strict-prototypes due to gtkitemfactory.h:
> >>
> >> /* We use () here to mean unspecified arguments. This is deprecated
> >> * as of C99, but we can't change it without breaking compatibility.
> >> * (Note that if we are included from a C++ program () will mean
> >> * (void) so an explicit cast will be needed.)
> >> */
> >> typedef void (*GtkItemFactoryCallback) ();
> >>
> >> Signed-off-by: Anthony Liguori <address@hidden>
> >> ---
> >> configure | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/configure b/configure
> >> index bf5970f..74d5878 100755
> >> --- a/configure
> >> +++ b/configure
> >> @@ -283,7 +283,7 @@ sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}"
> >> # default flags for all hosts
> >> QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS"
> >> QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes
> >> $QEMU_CFLAGS"
> >> -QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
> >> +QEMU_CFLAGS="-Wredundant-decls $QEMU_CFLAGS"
> >> QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> >> $QEMU_CFLAGS"
> >> QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
> >> if test "$debug_info" = "yes"; then
> >
> > Other places wrap the inclusion of problematic headers in '#pragma GCC
> > diagnostic ...' instead of globally disabling warnings.
>
> Available only in gcc-4.6+:
>
> http://gcc.gnu.org/gcc-4.6/changes.html
I think this is mostly the push/pop part. We avoid it for this reason
and just unconditionally make it error after including the header file.
The pragma is also only enabled by a configure check.
Have a look at include/ui/qemu-pixman.h or coroutine-ucontext.c for an
example.
Kevin
- [Qemu-devel] [PATCH 0/9] Add GTK UI to enable basic accessibility (v4), Anthony Liguori, 2013/02/18
- [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Anthony Liguori, 2013/02/18
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Kevin Wolf, 2013/02/20
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Laszlo Ersek, 2013/02/20
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Laszlo Ersek, 2013/02/20
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Kevin Wolf, 2013/02/20
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Laszlo Ersek, 2013/02/20
- Re: [Qemu-devel] [PATCH 1/9] build: disable Wstrict-prototypes, Markus Armbruster, 2013/02/20
[Qemu-devel] [PATCH 2/9] console: allow VCs to be overridden by UI, Anthony Liguori, 2013/02/18
[Qemu-devel] [PATCH 4/9] gtk: add virtual console support (v2), Anthony Liguori, 2013/02/18
[Qemu-devel] [PATCH 5/9] gtk: add support for input grabbing (v2), Anthony Liguori, 2013/02/18
[Qemu-devel] [PATCH 3/9] ui: add basic GTK gui (v4), Anthony Liguori, 2013/02/18