bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Gnulib's tempname.c does not compile with TCC: max_align_t undefined


From: Paul Eggert
Subject: Re: Gnulib's tempname.c does not compile with TCC: max_align_t undefined
Date: Thu, 4 Mar 2021 00:53:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/2/21 7:09 PM, Bruno Haible wrote:
+   /* On TinyCC, make sure that the macros that indicate the special invocation
+      convention get undefined.  */
+#  ifdef __TINYC__
+#   undef __need_wchar_t
+#   undef __need_size_t

Would it be more robust to omit the "#ifdef __TINYC__" line, and unconditionally undef those macros? That won't hurt GCC, and it should help with any compiler (not just tcc) that is incompatible with GCC in this respect.

Also, test-stdalign failed on Ubuntu 20.10 with tcc, since tcc's <stdalign.h> has a broken alignof when glibc headers like <stdint.h> are used. Glibc <stdint.h> defines __attribute__(x) to empty for compilers like tcc that do not define __GNUC__, but tcc's alignof relies on __attribute__. I installed the attached patch to try to work around that problem.

Attachment: 0001-stdalign-port-to-tcc-glibc.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]