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

Dennis Clarke dclarke at
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 -lm  ../src/ -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/ /opt/bw/lib/ -Wl,-rpath
-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
-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
tset_si.c:262:9: error: keyword is hidden by macro definition
#define long short
1 error generated.
*** Error code 1

make[2]: stopped in
*** Error code 1
*** Error code 1


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  }
   254  static void
   255  test_macros_keyword (void)
   256  {
   257    mpfr_t x;
   258    unsigned long i;
   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
   269                (unsigned long) MKN, i);
   270        exit (1);
   271      }
   272    mpfr_clear (x);
   273  }
   275  static void
   276  test_get_ui_smallneg (void)
   277  {
   278    mpfr_t x;
   279    int i;

So this is with LLVM/Clang thus :

callisto$ cc --version
FreeBSD clang version 10.0.1 (git at
Target: i386-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin

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
i386 i386 1300105 1300105

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

Dennis Clarke
UNIX and Linux spoken
GreyBeard and suspenders optional

More information about the gmp-discuss mailing list