2

Is there any C compiler(s) which defines both __STDC__ and __STDC_IEC_559__ to 1?

If so, then which one(s)?

Reason of the question: as far as I can test (April 2021), none of the latest versions of popular C compilers (gcc, clang, msvc) define both __STDC__ and __STDC_IEC_559__ to 1. Hence, these compilers may generate executable files, which produce non-IEEE 754 conformant results. However, there is a demand on such C compilers, which actually provide a guarantee / confidence that generated executable files produce IEEE 754 conformant results (under strict floating-point model option).

1 Answer 1

0

It turns out that the definition of __STDC_IEC_559__ depends on the host:

Compiler   Host       __STDC_IEC_559__
gcc        Windows    0
clang      Windows    0
gcc        Linux      1
clang      Linux      1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.