| Issue |
53132
|
| Summary |
Unclear for which purpose __STDC_IEC_559__ is defined to 1 under non-strict floating-point models
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
pmor13
|
Sample code:
```
#include <stdio.h> // fix for clang, see https://stackoverflow.com/q/69976945/1778275
#if __STDC_IEC_559__ == 1
#pragma message "__STDC_IEC_559__ is 1"
#else
#pragma message "__STDC_IEC_559__ is not 1"
#endif
```
Invocation:
```
# clang 13.0.0 on Linux on x86-64
$ clang t0.c -std=c11 -pedantic -Wall -Wextra -ffp-model=fast
```
Expected diagnostics:
```
t0.c:5:9: warning: __STDC_IEC_559__ is not 1 [-W#pragma-messages]
```
Actual diagnostics:
```
t0.c:3:9: warning: __STDC_IEC_559__ is 1 [-W#pragma-messages]
```
If clang under non-strict floating-point models does not conform to the specifications in the Annex F, then for which purpose it defines `__STDC_IEC_559__` to `1`?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs