X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lib%2Fbitfield.h;fp=lib%2Fbitfield.h;h=a9e268b4153031d9eb10ccae39df17c5f310b7ed;hb=4ea9b7c98ade603b08f0d945f4d99bc079eb57b6;hp=ebbe7544cdd585bff9351416490dc43c5cb67718;hpb=3b06049560550ae0e8203bfd5f307bc7cc63fcca;p=lttng-modules.git diff --git a/lib/bitfield.h b/lib/bitfield.h index ebbe7544..a9e268b4 100644 --- a/lib/bitfield.h +++ b/lib/bitfield.h @@ -29,8 +29,10 @@ /* * _bt_is_signed_type() willingly generates comparison of unsigned * expression < 0, which is always false. Silence compiler warnings. + * GCC versions lower than 4.6.0 do not accept diagnostic pragma inside + * functions. */ -#ifdef __GNUC__ +#if defined(__GNUC__) && (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600 # define _BT_DIAG_PUSH _Pragma("GCC diagnostic push") # define _BT_DIAG_POP _Pragma("GCC diagnostic pop")