[LLVMbugs] [Bug 13971] New: Clang hangs for the test case attached (array26.C)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Sep 28 03:01:25 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13971

             Bug #: 13971
           Summary: Clang hangs for the test case attached (array26.C)
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: mayur.p at samsung.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu,
                    mayurthebond at gmail.com
    Classification: Unclassified


Created attachment 9278
  --> http://llvm.org/bugs/attachment.cgi?id=9278
test case for which clang hangs.

For the following code:

struct A;

struct B
{
  A a; // { dg-error "incomplete type" }
};

B b[1] = (B[]) { 0 }; // { dg-error "initializer" }


clang++ hangs on compilation while giving the following error:


 error: field has incomplete type 'A'
  A a; // { dg-error "incomplete type" }
    ^
 note: forward declaration of 'A'
struct A;


It should be giving the error as given when compiled with g++: -- error:
initializer for ‘B’ must be brace-enclosed.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list