[llvm-bugs] [Bug 40173] New: c11: Rejects well-formed program using . operator on _Atomic struct in unevalueded context.
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Dec 28 04:43:44 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40173
Bug ID: 40173
Summary: c11: Rejects well-formed program using . operator on
_Atomic struct in unevalueded context.
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Test case (prog.c):
int main(void)
{
_Atomic struct S { int x; } s;
sizeof (s.x);
}
Compilation command line:
clang prog.c -Wall -Wextra -std=c11 -pedantic-errors
Observed behaviour:
The following error message was outputed:
prog.c:4:12: error: member reference base type '_Atomic(struct S)' is not a
structure or union
sizeof (s.x);
~^~
1 error generated.
Expected behaviour:
No error message outputed.
Note:
GCC accepts the program with no error message ourputed.
--
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/20181228/044d527a/attachment.html>
More information about the llvm-bugs
mailing list