minor noises made by gcc and -std=iso9899:1999 with -Wall -pedantic -Wextra -pedantic-errors

Torbjörn Granlund tg at gmplib.org
Mon Jul 1 12:45:03 UTC 2019

Vincent Lefevre <vincent at vinc17.net> writes:

  MPFR uses in a #else part:

  /* Avoid an empty translation unit (see ISO C99, 6.9) */
  typedef int foo;

  This is rather important, because even if the compiler can generate
  code, the behavior of this code is undefined[*] (I don't see why there
  would be any issue, but as compilers become more and more complex,
  who knows...), thus one might silently get wrong results.

GMP has not yet been ported to any system/compiler which causes problems
for empty "translation units".

I (still) believes development time is best used for solving actual
problem rather than hypothetical ones.  Also, if we silence pointless
warnings from compilers by making the code slower and/or harder to read,
that's not an improvement in my world.

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list