[llvm-bugs] [Bug 51574] New: Clang on Windows: #include <tgmath.h> leads to errors: _Complex type is incompatible with _Fcomplex type (complex.h from Windows Kits)

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 21 06:44:14 PDT 2021


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

            Bug ID: 51574
           Summary: Clang on Windows: #include <tgmath.h> leads to errors:
                    _Complex type is incompatible with _Fcomplex type
                    (complex.h from Windows Kits)
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          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

Sample code (t929.c):
#include <tgmath.h>

Invocation: clang t929.c -Wfatal-errors -c

Expected compiler diagnostics: <nothing>

Actual compiler diagnostics:
In file included from t929.c:1:
D:\SOFTWARE\LLVM\12.0.0\lib\clang\12.0.0\include\tgmath.h:72:50: fatal error:
passing '_Complex float' to parameter of
      incompatible type '_Fcomplex' (aka 'struct _C_float_complex')
    __tg_acos(float _Complex __x) {return cacosf(__x);}
                                                 ^~~
C:\Program Files (x86)\Windows
Kits\10\Include\10.0.20313.0\ucrt\complex.h:98:50: note: passing argument to
parameter '_Z'
      here
_ACRTIMP _Fcomplex __cdecl cacosf(_In_ _Fcomplex _Z);
                                                 ^
1 error generated.

Tool version: 12.0.0

-- 
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/20210821/6321d496/attachment.html>


More information about the llvm-bugs mailing list