X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fbitfield.h;h=5ed629381ac6ff9508b4e432d8d784660a776d9b;hb=3f6807bfb5f8e87d09251d3b284d9d586741186b;hp=92f1c2c988bcd0d2bfe3aa9aa137a0b5d6f8d272;hpb=b6e1397dc4506a816eec16342cb12a913b9b0b13;p=lttng-ust.git diff --git a/include/lttng/bitfield.h b/include/lttng/bitfield.h index 92f1c2c9..5ed62938 100644 --- a/include/lttng/bitfield.h +++ b/include/lttng/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")