+2020-08-11 Bruno Haible <bruno@clisp.org>
+
+ Use expression statements also on clang.
+ * lib/cdefs.h (__extension__): Don't define to empty on clang.
+ * lib/obstack.h (__extension__): Likewise.
+ (obstack_object_size, obstack_room, obstack_make_room, obstack_empty_p,
+ obstack_grow, obstack_grow0, obstack_1grow, obstack_ptr_grow,
+ obstack_int_grow, obstack_ptr_grow_fast, obstack_int_grow_fast,
+ obstack_blank, obstack_alloc, obstack_copy, obstack_copy0,
+ obstack_finish, obstack_free): Enable as optimized macros also on clang.
+ * lib/fpucw.h (fpucw_t etc.): Enable the definitions also on clang.
+
2020-08-10 Bruno Haible <bruno@clisp.org>
Use many __attribute__s with clang.
run in pedantic mode if the uses are carefully marked using the
`__extension__' keyword. But this is not generally available before
version 2.8. */
-#if !__GNUC_PREREQ (2,8)
+#if !(__GNUC_PREREQ (2,8) || defined __clang__)
# define __extension__ /* Ignore */
#endif
'long double' safe operation precision
*/
-/* Inline assembler like this works only with GNU C. */
-#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+/* Inline assembler like this works only with GNU C and clang. */
+#if (defined __i386__ || defined __x86_64__) && (defined __GNUC__ || defined __clang__)
typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
#define obstack_memory_used(h) _obstack_memory_used (h)
-#if defined __GNUC__
-# if !defined __GNUC_MINOR__ || __GNUC__ * 1000 + __GNUC_MINOR__ < 2008
+#if defined __GNUC__ || defined __clang__
+# if !(defined __GNUC_MINOR__ && __GNUC__ * 1000 + __GNUC_MINOR__ >= 2008 \
+ || defined __clang__)
# define __extension__
# endif