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

Re: [libvirt] [PATCH] maint: turn on gcc logical-op checking



On 08/27/2010 02:32 AM, Matthias Bolte wrote:

Well, even if this is fixed in GCC>= 4.5.0 and a workaround was added
to libcurl and Fedora isn't affected anymore doesn't mean that this
problem is fixed for all systems/distros out there.

I think we could remove CURL_DISABLE_TYPECHECK for GCC>= 4.5.0, but
keep it for older GCC versions.

Yes, that sounds better.  I guess I'll whip up the patch, then.


I tried to figure out how to detect GCC version in configure.ac, but
my autotools-fu is weak today.

No need to worry about configure.ac. It is doable all with preprocessor statements:

/* Some versions of libcurl trigger a gcc bug with -Wlogical-op
 * that was fixed for gcc 4.5.0; disable the problematic libcurl
 * code if we don't detect a good enough compiler.  */
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR < 5)
# define CURL_DISABLE_TYPECHECK
#endif

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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