[llvm-bugs] [Bug 50694] New: Clang on Windows: MSVC compatibility: #pragma fenv_access is not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 12 03:46:38 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50694

            Bug ID: 50694
           Summary: Clang on Windows: MSVC compatibility: #pragma
                    fenv_access is not supported
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pavel.morozkin at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

MSVC does not support #pragma STDC FENV_ACCESS ON:

cl t125.c /std:c11
t125.c(11): warning C4068: unknown pragma 'STDC'

Instead MSVC does support #pragma fenv_access (on). This leads to this code:

#if _MSC_VER
#pragma fenv_access (on)
#else
#pragma STDC FENV_ACCESS ON
#endif

Now try to compile this code using the latest Clang on Windows:

$ /cygdrive/d/SOFTWARE/LLVM/12.0.0/bin/clang t125.c -Wall -Wextra
t125.c:10:9: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma fenv_access (on)

Meaning that since #pragma fenv_access (on) is unknown pragma which is ignored,
then the MSVC compatibility is underdone / unfinished? Confused.

For Clang on Windows with MSVC compatibility enabled: please add support of
#pragma fenv_access.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210612/eb8a6eee/attachment-0001.html>


More information about the llvm-bugs mailing list