[LLVMbugs] [Bug 10792] New: warning vs error for dyncast8.C

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Aug 27 13:53:33 PDT 2011


           Summary: warning vs error for dyncast8.C
           Product: clang
           Version: 2.9
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rkotler at mips.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=7163)
 --> (http://llvm.org/bugs/attachment.cgi?id=7163)

g++ reports no warning or error.

icpc reports a warning.

clang++ an error.

for g++ compatibility mode, i think that that things which are easy to allow
should be allowed. 

rkotler at ubuntu-rkotler:~/icpc$ icpc
warning #854: const variable "b" requires an initializer -- class "Derived" has
no user-provided default constructor
      const Derived b;

rkotler at ubuntu-rkotler:~/icpc$ /home/rkotler/build_llvm/install/bin/clang++ 
      default initialization of an object of const type 'const Derived'
      requires a user-provided default constructor
    const Derived b;
1 error generated.
rkotler at ubuntu-rkotler:~/icpc$ g++
/home/rkotler/gcc-4.4.6/gcc/testsuite/g++.old-deja/g++.mike/dyncast8.Crkotler at ubuntu-rkotler:~/icpc$

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