aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sciteco.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sciteco.h')
-rw-r--r--src/sciteco.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sciteco.h b/src/sciteco.h
index 84c9775..a1e2d4b 100644
--- a/src/sciteco.h
+++ b/src/sciteco.h
@@ -63,7 +63,12 @@ extern sig_atomic_t sigint_occurred;
#define IS_SUCCESS(X) ((X) < 0)
#define IS_FAILURE(X) (!IS_SUCCESS(X))
-#define CHR2STR(X) ((gchar []){X, '\0'})
+/*
+ * NOTE: compound literals are temporaries beginning with
+ * g++ 4.7
+ */
+#define CHR2STR(X, ...) \
+ ({gchar str[] = {(X), ##__VA_ARGS__, '\0'}; str;})
namespace String {