From: Michael Jeanson Date: Thu, 17 Mar 2022 17:45:51 +0000 (-0400) Subject: fix: __STDC_VERSION__ can be undefined in C++ X-Git-Tag: v2.12.4~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=965217ac81b2962a5259054692ccc2fd9c226194;p=lttng-ust.git fix: __STDC_VERSION__ can be undefined in C++ Caught on SLES12 with g++ 4.8 when enabling '-Wundef'. Change-Id: Ib027f224a4f0ef021beb1709d8a626db62fe6d9c Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/tests/utils/tap.h b/tests/utils/tap.h index 0f059430..8be550bb 100644 --- a/tests/utils/tap.h +++ b/tests/utils/tap.h @@ -47,7 +47,7 @@ skip(n, fmt, ## __VA_ARGS__); \ continue; \ } -#elif __STDC_VERSION__ >= 199901L /* __GNUC__ */ +#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* __GNUC__ */ # define ok(e, ...) ((e) ? \ _gen_result(1, __func__, __FILE__, __LINE__, \ __VA_ARGS__) : \