[llvm-bugs] [Bug 40719] New: Atomic qualifier not removed in lvalue conversion

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Feb 13 07:51:14 PST 2019


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

            Bug ID: 40719
           Summary: Atomic qualifier not removed in lvalue conversion
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: al.grant at arm.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

Clang faults this C code:

error: returning '_Atomic(int)' from a function with incompatible result type
'int'

int f1(_Atomic(int) *p) { return *p = 1; }
int f2(_Atomic(int) *p) { return *p += 1; }

But the assignments undergo lvalue conversion which should remove
the _Atomic qualifier.

https://godbolt.org/z/hOaVRV

-- 
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/20190213/2b638858/attachment.html>


More information about the llvm-bugs mailing list