Joachim Schmitz wrote:
> During compile of gltests:
> Something very weird errors in test-allignof.c:
> source='test-alignof.c' object='test-alignof.o' libtool=no DEPDIR=.deps
> depmode=none /bin/sh ./../build-aux/depcomp cc -DHAVE_CONFIG_H -I.
> -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. -I../gllib -I./../gllib
> -I/usr/local/include -g -Wnowarn -c -o test-alignof.o test-alignof.c
> CHECK (char)
> ^
> "/usr/local/Floss/gnulib/testdir-posix/gltests/test-alignof.c", line 40:
> error(197):
> invalid size for bit field
> ...
This looks pretty weird:
alignof_slot (char) and offsetof (char_helper, slot2) should be different??
Where alignof_slot (char) is defined as
offsetof (struct { char __slot1; char __slot2; }, __slot2)
and char_helper is defined through
typedef struct { char slot1; char slot2; } char_helper;
The only differences between the left-hand side and the right-hand side
are the names of the struct fields, and the use of 'typedef'.
You need to look at the preprocessed output (cc -E) of test-alignof.c
and trim it down to produce a minimal test case.
Bruno