bug-gnulib
[Top][All Lists]
Advanced

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

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


From: Luca Saiu
Subject: Gnulib's tempname.c does not compile with TCC: max_align_t undefined
Date: Tue, 02 Mar 2021 23:14:57 +0100
User-agent: Gnus (Gnus v5.13), GNU Emacs 27.0.50, x86_64-pc-linux-gnu

Hello.  I am seeing a little problem with Gnulib using TCC (the Tiny C
Compiler) on a very ordinary platform, GNU/Linux x86_64 with glibc 2.31.

I will use Jitter as a test case.  This works:

git clone https://git.savannah.gnu.org/git/gnulib.git
cd jitter
./bootstrap
mkdir -p _build/native _build/native-tcc
cd _build/native
../../configure && make
[...] All good.

Now let us try with TCC instead of GCC:

cd ../native-tcc
../../configure CC=tcc && make
[...]
libtool: compile:  tcc -DHAVE_CONFIG_H -I. -I../../../gnulib-local 
-I../config-private -I../jitter -g -c ../../../gnulib-local/tempname.c -MD -MF 
.deps/tempname.TPlo -o tempname.o
../../../gnulib-local/tempname.c:268: error: 'max_align_t' undeclared

This is line 268:

  random_value v = ((uintptr_t) &v) / alignof (max_align_t);

This is in fact the only problem I can see in Gnulib and I can work
around it easily by replacing max_align_t by, for example, long double .
With that change I can even build Jitter examples and pass the test
suite.

Thanks for Gnulib,

-- 
Luca Saiu
* My personal web site:  http://ageinghacker.net
* Jitter:                http://ageinghacker.net/projects/jitter
* GNU epsilon:           http://www.gnu.org/software/epsilon

I support everyone's freedom of mocking any opinion or belief, no
matter how deeply held, with open disrespect and the same unrelented
enthusiasm of a toddler who has just learned the word "poo".

Attachment: signature.asc
Description: PGP signature


reply via email to

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