[glib/wip/pwithnall/2625-clang-cxx] WIP




commit a0631496ca7227d9a40fe8e3555f24224566fb73
Author: Philip Withnall <pwithnall endlessos org>
Date:   Fri Apr 1 17:03:25 2022 +0100

    WIP
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 glib/gatomic.h     | 7 +++++++
 glib/glib-typeof.h | 5 +++++
 2 files changed, 12 insertions(+)
---
diff --git a/glib/gatomic.h b/glib/gatomic.h
index 8b2b880c8d..2012b32d69 100644
--- a/glib/gatomic.h
+++ b/glib/gatomic.h
@@ -196,6 +196,13 @@ G_END_DECLS
     (guint) __atomic_fetch_xor ((atomic), (val), __ATOMIC_SEQ_CST);          \
   }))
 
+#if defined(__cplusplus)
+#pragma message (G_STRINGIFY (__cplusplus))
+#if defined(glib_typeof)
+#pragma message "glib_typeof defined"
+#endif
+#endif
+
 #if defined(glib_typeof) && defined(__cplusplus) && __cplusplus >= 201103L
 /* This is typesafe because we check we can assign oldval to the type of
  * (*atomic). Unfortunately it can only be done in C++ because gcc/clang warn
diff --git a/glib/glib-typeof.h b/glib/glib-typeof.h
index 198901c295..1c8a98023a 100644
--- a/glib/glib-typeof.h
+++ b/glib/glib-typeof.h
@@ -24,6 +24,11 @@
 
 #include <glib/gversionmacros.h>
 
+#if defined(__cplusplus)
+#pragma message (G_STRINGIFY (__cplusplus))
+#pragma message (G_STRINGIFY (GLIB_VERSION_MIN_REQUIRED))
+#endif
+
 /*
  * We can only use __typeof__ on GCC >= 4.8, and not when compiling C++. Since
  * __typeof__ is used in a few places in GLib, provide a pre-processor symbol


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]