Files
llvm-mingw/test
Martin Storsjö 9be66e9d22 crt-test: Fix the macros for avoiding compiler optimizations
The macros F() and L() etc were meant for providing constants for
the tests, without the compiler seeing them as constants, to
avoid optimizing out the entire functions that are to be tested.

However in practice, the compiler is also able to optimize out
e.g. a call to strtol("42", NULL, 0), so this didn't have the
intended effect.

Instead make the macros wrap through a no-op function, but which
is indirected via a global function pointer. The compiler can't
reason about global variables keeping their values (they could be
modified by e.g. a constructor in a different object file, before
running the main function). This avoids needing to pass all values
through strtod/strtol etc.

Change some constants like 123456789012345, which are seen by
the compiler as integer constants (which aren't exactly representable
in floating point form) into 123456789012345.0, which the compiler
won't complain about being inexact.
2022-10-14 14:33:51 +03:00
..
2019-03-12 10:42:43 +02:00
2019-12-20 09:43:39 +02:00
2020-09-16 00:03:57 +03:00
2020-09-16 00:03:57 +03:00
2018-06-05 23:40:25 +03:00
2018-10-17 22:45:54 +03:00