#pragma STDC FENV_ROUND FE_TONEAREST gives misleading warning
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
The statement:
#pragma STDC FENV_ROUND FE_TONEAREST
Gets:
warning: expected identifier in '#pragma FENV_ROUND' - ignored [-Wignored-pragmas]
which is misleading.
1) The 'STDC' got dropped in the message.
2) FE_TONEAREST is a valid 'direction' as per the C standard.
If the pragma is not supported, the warning should say so.
If the pragma is supported, there should be no warning.
Contributor guide
Research direction
Start by searching the compiler diagnostics for “expected identifier in '#pragma FENV_ROUND'” and the handling of #pragma STDC FENV_ROUND. Check the relevant compiler tests, if found alongside that implementation. Done means the diagnostic preserves STDC and accurately reports unsupported pragmas, or the valid FE_TONEAREST form is accepted without a warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100