bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic o


From: Hu Tao
Subject: Re: [libvirt] [PATCH 03/13] Rewrite virAtomic APIs using GLib's atomic ops code
Date: Fri, 20 Jul 2012 14:36:13 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jul 19, 2012 at 08:15:28AM -0600, Eric Blake wrote:
> On 07/18/2012 07:07 PM, Hu Tao wrote:
> > <...>
> > 
> >> +
> >> +#  define virAtomicIntGet(atomic)                                       \
> >> +    (__extension__ ({                                                   \
> >> +            verify (sizeof(*(atomic)) == sizeof(int));                  \
> >> +            (void) (0 ? *(atomic) ^ *(atomic) : 0);                     \
> >> +            __sync_synchronize ();                                      \
> >> +            (int) *(atomic);                                            \
> >> +        }))
> 
> > 
> > The `verify' lines cause building warnings:
> > 
> > cc1: warnings being treated as errors
> > util/virobject.c: In function 'virClassNew':
> > util/virobject.c:74:99: error: nested extern declaration of 
> > '_gl_verify_function2' [-Wnested-externs]
> 
> Which version of gcc?
> 
> I'll have to see if I can come up with a solution in upstream gnulib
> that expands verify() in such a way that works with -Wnested-externs.

$ gcc --version
gcc (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Copyright (C) 2010 Free Software Foundation, Inc.


This is the gcc shipped with Fedora 14.

-- 
Thanks,
Hu Tao



reply via email to

[Prev in Thread] Current Thread [Next in Thread]