Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Signaling NaNs are seem supported but __SUPPORT_SNAN__ is not defined #51544

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR52577
Status NEW
Importance P enhancement
Reported by Pavel Morozkin (pavel.morozkin@gmail.com)
Reported on 2021-11-22 03:31:20 -0800
Last modified on 2021-11-22 03:31:20 -0800
Version 13.0
Hardware PC Linux
CC blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Note: this may not be a bug, but the subject needs a clarification.

This code:
#define _WANT_SNAN
#ifdef __SUPPORT_SNAN__
#pragma message "__SUPPORT_SNAN__ is defined"
#else
#pragma message "__SUPPORT_SNAN__ is not defined"
#endif

compiled with:
$ clang -std=c11 -pedantic -Wall -Wextra -ffp-model=strict -c

leads to:
<source>:5:9: warning: __SUPPORT_SNAN__ is not defined [-W#pragma-messages]

However, according to some tests signaling NaNs are supported.

Then what is the real reason to not define __SUPPORT_SNAN__?

It may be useful to mention the status of support of signaling NaNs in User's
Manual: https://clang.llvm.org/docs/UsersManual.html.

Version: clang 13.0.0 on x86_64 on Linux