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: unassignedclangb...@nondot.org
          Reporter: anders.granlun...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

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
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to