[LLVMbugs] [Bug 6631] New: Flase error: allocation of an object of abstract type 'Polynomial'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 17 02:27:05 PDT 2010


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

           Summary: Flase error: allocation of an object of  abstract type
                    'Polynomial'
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: Fons.Rademakers at cern.ch
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=4539)
 --> (http://llvm.org/bugs/attachment.cgi?id=4539)
Source file exhibiting the problem

The attached aap.cxx compiles fine with g++ (and for that matter any other know
compiler), but not with clang++. Do:

clang++ -c aap.cxx
In file included from math/mathmore/src/Polynomial.cxx:1:
math/mathmore/src/Polynomial.cxx:145:26: error: allocation of an object of
      abstract type 'Polynomial'
    Polynomial * f = new Polynomial(fOrder);
                         ^
In file included from math/mathmore/src/Polynomial.cxx:1:
In file included from math/mathmore/src/Polynomial.cxx:32:
In file included from include/Math/Polynomial.h:36:
In file included from include/Math/ParamFunction.h:38:
In file included from include/Math/IParamFunction.h:17:
include/Math/IFunction.h:172:22: note: pure virtual function 'DoEval'
      virtual double DoEval(double x) const = 0;
                     ^
2 diagnostics generated.

Compiles fine with g++.

Cheers, Fons.

-- 
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