From 55f99993c3e72dbb60d426ffd874ed7544625b5d Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 17 Jan 2012 20:22:10 +0000 Subject: Only use the static assertion when __generic is available. Reported by: tijl --- include/complex.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/complex.h b/include/complex.h index 33c7940..0702541 100644 --- a/include/complex.h +++ b/include/complex.h @@ -36,6 +36,9 @@ #define _Complex __complex__ #endif #define _Complex_I ((float _Complex)1.0i) +#endif + +#ifdef __generic _Static_assert(__generic(_Complex_I, float _Complex, 1, 0), "_Complex_I must be of type float _Complex"); #endif -- cgit v1.1