Skip to content

#pragma STDC FENV_ROUND FE_TONEAREST gives misleading warning #173098

@tydeman

Description

@tydeman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions