yet another strange message from LLVM/Clang on FreeBSD 13 i686

Dennis Clarke dclarke at blastwave.org
Sun Aug 23 18:23:29 UTC 2020



I have not seen this on any other architecture but on 32-bit i686
FreeBSD 13 I see this when running "make check" :

.
.
.
/bin/sh ../libtool  --tag=CC    --mode=link /usr/bin/cc
-std=iso9899:1999 -pedantic -pedantic-errors -m32 -g -O0 -fno-fast-math
-fno-builtin  -no-install -L../src/.libs -L/opt/bw/lib -o tset_q
tset_q.o libfrtests.la -lm  ../src/libmpfr.la -lgmp
libtool: link: /usr/bin/cc -std=iso9899:1999 -pedantic -pedantic-errors
-m32 -g -O0 -fno-fast-math -fno-builtin -o tset_q tset_q.o
-L../src/.libs -L/opt/bw/lib ./.libs/libfrtests.a -lm
../src/.libs/libmpfr.so /opt/bw/lib/libgmp.so -Wl,-rpath
-Wl,/opt/bw/build/mpfr-4.1.0_FreeBSD_13_r363935_i686.002/src/.libs
-Wl,-rpath -Wl,/opt/bw/lib -Wl,-rpath -Wl,/opt/bw/lib
depbase=`echo tset_si.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; /usr/bin/cc
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DLT_OBJDIR=\".libs/\"
-DHAVE_LITTLE_ENDIAN=1 -DHAVE_CLOCK_GETTIME=1 -DTIME_WITH_SYS_TIME=1
-DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1 -DHAVE_SYS_TIME_H=1
-DHAVE_STRUCT_LCONV_DECIMAL_POINT=1 -DHAVE_STRUCT_LCONV_THOUSANDS_SEP=1
-DHAVE_ALLOCA=1 -DHAVE_UINTPTR_T=1 -DHAVE_VA_COPY=1 -DHAVE_SETLOCALE=1
-DHAVE_GETTIMEOFDAY=1 -DHAVE_SIGNAL=1 -DHAVE_SIGACTION=1
-DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1 -DMPFR_HAVE_INTMAX_MAX=1
-DMPFR_HAVE_BUILTIN_UNREACHABLE=1 -DMPFR_HAVE_CONSTRUCTOR_ATTR=1
-DMPFR_HAVE_FESETROUND=1 -DHAVE_SUBNORM_DBL=1 -DHAVE_SUBNORM_FLT=1
-DHAVE_SIGNEDZ=1 -DHAVE_ROUND=1 -DHAVE_TRUNC=1 -DHAVE_FLOOR=1
-DHAVE_CEIL=1 -DHAVE_NEARBYINT=1 -DHAVE_DOUBLE_IEEE_LITTLE_ENDIAN=1
-DHAVE_LDOUBLE_IEEE_EXT_LITTLE=1 -DMPFR_USE_THREAD_SAFE=1
-DMPFR_USE_STATIC_ASSERT=1 -DHAVE_ATTRIBUTE_MODE=1 -DPRINTF_L=1
-DPRINTF_T=1 -DPRINTF_GROUPFLAG=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1
-DMPFR_LONG_WITHIN_LIMB=1 -DHAVE_GETRUSAGE=1 -I.  -DSRCDIR='"."'
-I../src  -I../src  -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
-D_TS_ERRNO -I/opt/bw/include  -std=iso9899:1999 -pedantic
-pedantic-errors -m32 -g -O0 -fno-fast-math -fno-builtin -MT tset_si.o
-MD -MP -MF $depbase.Tpo -c -o tset_si.o tset_si.c && mv -f $depbase.Tpo
$depbase.Po
tset_si.c:262:9: error: keyword is hidden by macro definition
[-Werror,-Wkeyword-macro]
#define long short
        ^
1 error generated.
*** Error code 1

Stop.
make[2]: stopped in
/opt/bw/build/mpfr-4.1.0_FreeBSD_13_r363935_i686.002/tests
*** Error code 1
*** Error code 1

callisto$

While I think it may be strange to define long short there is not
anything wrong :

callisto$ cat -n tests/tset_si.c | head -280 | tail -30
   251    mpfr_clears (x[0], x[1], x[2], (mpfr_ptr) 0);
   252  }
   253
   254  static void
   255  test_macros_keyword (void)
   256  {
   257    mpfr_t x;
   258    unsigned long i;
   259
   260    mpfr_init2 (x, 64);
   261  #define MKN 0x1000000
   262  #define long short
   263    mpfr_set_ui (x, MKN, MPFR_RNDN);
   264  #undef long
   265    i = mpfr_get_ui (x, MPFR_RNDN);
   266    if (i != MKN)
   267      {
   268        printf ("Error in test_macros_keyword: expected 0x%lx, got
0x%lx.\n",
   269                (unsigned long) MKN, i);
   270        exit (1);
   271      }
   272    mpfr_clear (x);
   273  }
   274
   275  static void
   276  test_get_ui_smallneg (void)
   277  {
   278    mpfr_t x;
   279    int i;
   280
callisto$

So this is with LLVM/Clang thus :

callisto$
callisto$ cc --version
FreeBSD clang version 10.0.1 (git at github.com:llvm/llvm-project.git
llvmorg-10.0.1-0-gef32c611aa2)
Target: i386-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
callisto$

I do admit this is a strange machine and not really a production grade
 release here :

callisto$ uname -apKU
FreeBSD callisto 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r363935: Thu Aug
6 06:41:09 UTC 2020
root at releng1.nyi.freebsd.org:/usr/obj/usr/src/i386.i386/sys/GENERIC
i386 i386 1300105 1300105
callisto$

In any case, thought I would share the strange error message that I see
no where else.


-- 
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional


More information about the gmp-discuss mailing list