[llvm-bugs] [Bug 50856] New: Compile error when compiling seh0020.c of github microsoft compiler-tests

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 24 20:35:56 PDT 2021


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

            Bug ID: 50856
           Summary: Compile error when compiling seh0020.c of github
                    microsoft compiler-tests
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tao.pan at intel.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

No problem if use cl.exe
D:\llvm\compiler-tests\seh>cl.exe seh0020.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

seh0020.c
Microsoft (R) Incremental Linker Version 14.29.30037.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:seh0020.exe
seh0020.obj

Compile error if use clang-cl.exe
$ /c/work/llvm/llvm-project-4/build/Release/bin/clang-cl.exe seh0020.c
-fuse-ld=lld
seh0020.c(20,5): error: assignment to cast is illegal, lvalue casts are not
supported
    (volatile LONG) Counter += 1;
    ^~~~~~~~~~~~~~~~~~~~~~~ ~~
seh0020.c(24,5): error: assignment to cast is illegal, lvalue casts are not
supported
    (volatile LONG) Counter += 1;
    ^~~~~~~~~~~~~~~~~~~~~~~ ~~
seh0020.c(28,48): warning: format specifies type 'int' but the argument has
type 'LONG' (aka 'long') [-Wformat]
    printf("TEST 20 FAILED. Counter = %d\n\r", Counter);
                                      ~~       ^~~~~~~
                                      %ld
1 warning and 2 errors generated.

-- 
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/20210625/f7a629dc/attachment.html>


More information about the llvm-bugs mailing list