X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=src%2Fcompat%2Fbitfield.h;h=e2f2c128ed79ad5048099ef042928b2743b6c5c4;hp=5e5a046f033d600ce67821c8f8ae4062b3ea7ef2;hb=193015bb595d8a5500e658a5e0be7370de5d33e3;hpb=b5009ed10ca3f85844496ab48d65797b0277c740 diff --git a/src/compat/bitfield.h b/src/compat/bitfield.h index 5e5a046f..e2f2c128 100644 --- a/src/compat/bitfield.h +++ b/src/compat/bitfield.h @@ -44,8 +44,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")