X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-compiler.h;h=674b519cd11991ee4a04b42abdb081e86d2d7843;hb=7075c5a2f8f4f90a018d7d1ea8c6dadda609495d;hp=32fd1bb25ed9ddb3a984b3882969c5c72b348f20;hpb=bff668bf532bb223c83455cb43aa775a6bdfd6f3;p=lttng-ust.git diff --git a/include/lttng/ust-compiler.h b/include/lttng/ust-compiler.h index 32fd1bb2..674b519c 100644 --- a/include/lttng/ust-compiler.h +++ b/include/lttng/ust-compiler.h @@ -65,9 +65,12 @@ * static assertion. This parameter must be a valid C identifier as it will * be used as a typedef name. */ -#if defined (__cplusplus) || __STDC_VERSION__ >= 201112L +#ifdef __cplusplus #define lttng_ust_static_assert(predicate, msg, c_identifier_msg) \ static_assert(predicate, msg) +#elif __STDC_VERSION__ >= 201112L +#define lttng_ust_static_assert(predicate, msg, c_identifier_msg) \ + _Static_assert(predicate, msg) #else /* * Evaluates the predicate and emit a compilation error on failure.