[llvm-bugs] [Bug 41033] New: problem with _Atomic type determination and compatibility for statement expressions - C mode

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 11 11:49:44 PDT 2019


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

            Bug ID: 41033
           Summary: problem with _Atomic type determination and
                    compatibility for statement expressions - C mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mib.bugzilla 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

I see this problem for expressions in initializatin, assignment, and parameter
passing, the test case is cut down from builds of open source applications like
ffmpeg and a couple others, using gcc8 stdatomic.h

Here's a test case
_Atomic(int) ai;
int fn1 ()
{
    int j = ai; // This is OK
    int i = ({ 1; ai;});  // This gets an error, initializing int with
incompatible type
//    i = ai;
//    i = ({ 1; ai;});
}

--Melanie Blower (I work for Intel on the C++ compiler)

-- 
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/20190311/62cf26a3/attachment.html>


More information about the llvm-bugs mailing list