https://bugs.llvm.org/show_bug.cgi?id=40171
Bug ID: 40171
Summary: c11: Rejects well-formed program qualifying incomplete
object type with _Atomic qualifier.
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Test case (prog.c):
int main()
{
_Atomic struct S *p;
}
Compilation command line:
clang prog.c -Wall -Wextra -std=c11 -pedantic-errors
Observed behaviour:
The following error message was outputed:
prog.c:3:5: error: _Atomic cannot be applied to incomplete type 'struct S'
_Atomic struct S *p;
^
prog.c:3:20: note: forward declaration of 'struct S'
_Atomic struct S *p;
^
1 error generated.
Expected behaviour:
No error messages outputed.
I cannot find anything in the standard forbidding qualifying incomplete
object
types with the _Atomic qualifier.
Note:
GCC accepts the program without outputing any error messages.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs