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: unassignedclangb...@nondot.org
Reporter: al.gr...@arm.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs