summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib.h b/lib.h
index 34f00c09..a161133c 100644
--- a/lib.h
+++ b/lib.h
@@ -1442,9 +1442,13 @@ INLINE int null_or_missing_p(val v) { return (nilp(v) || missingp(v)); }
#define if3(a, b, c) ((a) ? (b) : (c))
+#ifdef __GNUC__
+#define uses_or2 enum { f_o_o_ ## __LINE__ }
+#define or2(a, b) ((a) ?: (b))
+#else
#define uses_or2 val or2_temp
-
#define or2(a, b) ((or2_temp = (a)) ? or2_temp : (b))
+#endif
#define or3(a, b, c) or2(a, or2(b, c))