[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commit 452fee36 causes trouble when compiling with clang
From: |
Benno Schulenberg |
Subject: |
commit 452fee36 causes trouble when compiling with clang |
Date: |
Sun, 23 Aug 2020 10:18:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Hi,
Running a compile test of nano with the current state of gnulib
(commit 452fee36, "verify: Do use __builtin_assume on clang")
on FreeBSD (which happens to use clang), the compile failed:
clang -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -D_DEFAULT_SOURCE
-I/usr/include/ncursesw -g -O1 -march=native -Wvla -Wshadow -Wall -MT regex.o
-MD -MP -MF $depbase.Tpo -c -o regex.o regex.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from regex.c:74:
./regexec.c:1198:3: error: invalid application of 'typeof' to bit-field
DEBUG_ASSERT (state->halt);
^
./regex_internal.h:42:26: note: expanded from macro 'DEBUG_ASSERT'
# define DEBUG_ASSERT(x) assume (x)
^
./verify.h:327:27: note: expanded from macro 'assume'
((void) ({ __typeof__ (R) _gl_verify_temp = (R); \
^
1 error generated.
Stepping one commit back, the compile succeeds fine.
$ clang --version
FreeBSD clang version 8.0.1 (tags/RELEASE_801/final 366581) (based on LLVM
8.0.1)
Same failure on Ubuntu 18.04 when using clang.
$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Benno
signature.asc
Description: OpenPGP digital signature
- commit 452fee36 causes trouble when compiling with clang,
Benno Schulenberg <=