[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Portability issues with scractch_buffer
From: |
Akim Demaille |
Subject: |
Portability issues with scractch_buffer |
Date: |
Tue, 19 Jan 2021 19:22:22 +0100 |
Hi all,
Clang 3.3 and 3.4 cannot compile the new scratch-buffer module. On Bison's CI
(Clang 3.4: https://api.travis-ci.org/v3/job/755133481/log.txt), there is:
> make[2]: Entering directory `/home/travis/build/bison-3.7.4.285-a7d1a/_build'
> CC lib/lib_libbison_a-bitsetv.o
> CC lib/lib_libbison_a-c-ctype.o
> CC lib/lib_libbison_a-c-strcasecmp.o
> CC lib/lib_libbison_a-c-strncasecmp.o
> CC lib/lib_libbison_a-canonicalize.o
> In file included from ../lib/canonicalize.c:31:
> In file included from ../lib/scratch_buffer.h:28:
> ../lib/malloc/scratch_buffer.h:69:11: error: unknown type name 'max_align_t'
> union { max_align_t __align; char __c[1024]; } __space;
> ^
> ../lib/canonicalize.c:237:15: warning: declaration does not declare anything
> [-Wmissing-declarations]
> FALLTHROUGH;
> ^~~~~~~~~~~
> ../lib/attribute.h:142:21: note: expanded from macro 'FALLTHROUGH'
> #define FALLTHROUGH _GL_ATTRIBUTE_FALLTHROUGH
> ^~~~~~~~~~~~~~~~~~~~~~~~~
> ./lib/config.h:2016:36: note: expanded from macro '_GL_ATTRIBUTE_FALLTHROUGH'
> # define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
> ^~~~~~~~~~~~~
> 1 warning and 1 error generated.
> make[2]: *** [lib/lib_libbison_a-canonicalize.o] Error 1
> make[2]: *** Waiting for unfinished jobs....
> CC lib/lib_libbison_a-careadlinkat.o
> make[2]: Leaving directory `/home/travis/build/bison-3.7.4.285-a7d1a/_build'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/travis/build/bis
Cheers!
- Portability issues with scractch_buffer,
Akim Demaille <=