* [PATCH lttng-ust 2/2] Fix: do not use diagnostic pragma when GCC version is lower than 4.6.0
[not found] <20190704185137.24943-1-jonathan.rajotte-julien@efficios.com>
@ 2019-07-04 18:51 ` Jonathan Rajotte
2019-07-04 18:54 ` [PATCH lttng-ust 1/2] Fix: missing define when not building with gcc Mathieu Desnoyers
1 sibling, 0 replies; 2+ messages in thread
From: Jonathan Rajotte @ 2019-07-04 18:51 UTC (permalink / raw)
To: lttng-dev
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
---
include/lttng/bitfield.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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")
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH lttng-ust 1/2] Fix: missing define when not building with gcc
[not found] <20190704185137.24943-1-jonathan.rajotte-julien@efficios.com>
2019-07-04 18:51 ` [PATCH lttng-ust 2/2] Fix: do not use diagnostic pragma when GCC version is lower than 4.6.0 Jonathan Rajotte
@ 2019-07-04 18:54 ` Mathieu Desnoyers
1 sibling, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2019-07-04 18:54 UTC (permalink / raw)
To: Jonathan Rajotte; +Cc: lttng-dev
Both patches merged into master, 2.11, 2.10, 2.9, thanks!
Mathieu
----- On Jul 4, 2019, at 2:51 PM, Jonathan Rajotte jonathan.rajotte-julien@efficios.com wrote:
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
> ---
> include/lttng/bitfield.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/lttng/bitfield.h b/include/lttng/bitfield.h
> index 7faf23f9..92f1c2c9 100644
> --- a/include/lttng/bitfield.h
> +++ b/include/lttng/bitfield.h
> @@ -59,6 +59,7 @@
> # define _BT_DIAG_PUSH
> # define _BT_DIAG_POP
> # define _BT_DIAG_IGNORE
> +# define _BT_DIAG_IGNORE_TYPE_LIMITS
> #endif
>
> #define _bt_is_signed_type(type) ((type) -1 < (type) 0)
> --
> 2.17.1
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-04 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190704185137.24943-1-jonathan.rajotte-julien@efficios.com>
2019-07-04 18:51 ` [PATCH lttng-ust 2/2] Fix: do not use diagnostic pragma when GCC version is lower than 4.6.0 Jonathan Rajotte
2019-07-04 18:54 ` [PATCH lttng-ust 1/2] Fix: missing define when not building with gcc Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).