Skip to contentSkip to conversation

compiler: use __GNUC__ instead of the undefined __GNUC_MAJOR__

PATCH Mathieu Desnoyers 1 participant 1 message Oct 24, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mathieu Desnoyers

author Applied
#1 lore raw

Merged into master and stable-0.8, thanks!

Mathieu

----- Original Message -----

Quoted 37 lines

From: "Emilio G. Cota" <[email protected]>
To: [email protected]
Sent: Monday, October 13, 2014 10:31:25 PM
Subject: [lttng-dev] [urcu][PATCH] compiler: use __GNUC__ instead of the undefined __GNUC_MAJOR__

gcc defines the major number with __GNUC__, not __GNUC_MAJOR__:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

---
 urcu/compiler.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
urcu/compiler.h +2 -3
index 1e30903..2e0237e 100644
@@ -97,8 +97,8 @@
 		(unsigned long) (v))
 
 #if defined (__GNUC__) \
-	&& ((__GNUC_MAJOR__ == 4) && (__GNUC_MINOR__ >= 5)	\
-		|| __GNUC_MAJOR__ >= 5)
+	&& ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)	\
+		|| __GNUC__ >= 5)
 #define CDS_DEPRECATED(msg)	\
 	__attribute__((deprecated(msg)))
 #else
--

1.8.3

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com