[LLVMbugs] [Bug 9627] New: potentially bogus constructor errors

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 4 15:36:30 PDT 2011


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

           Summary: potentially bogus constructor errors
           Product: clang
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: howarth at nitro.med.uc.edu
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The modules/cealign/src/ccealignmodule.cpp c++ source file from pymol 1.3 fails
to compile due to potentially bogus constructor errors...

clang++ -c ccealignmodule.ii -o ccealignmodule.o
In file included from ccealignmodule.cpp:1:
In file included from ccealignmodule.cpp:32:
In file included from ./ccealignmodule.H:36:
In file included from ./tnt/tnt.h:55:
tnt/tnt_sparse_matrix_csr.h:97:3: error: no matching constructor for
initialization of 'Array1D<int>'
  rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {}
  ^       ~~~~
In file included from ccealignmodule.cpp:1:
In file included from ccealignmodule.cpp:32:
In file included from ./ccealignmodule.H:36:
In file included from ./tnt/tnt.h:41:
tnt/tnt_array1d.h:63:17: note: candidate constructor not viable: no known
conversion from 'const int *' to 'int const' for 2nd argument
       explicit Array1D(int n, const T &a);
                ^
tnt/tnt_array1d.h:64:11: note: candidate constructor not viable: 2nd argument
('const int *') would lose const qualifier
          Array1D(int n, T *a);
          ^
tnt/tnt_array1d.h:61:11: note: candidate constructor not viable: requires 0
arguments, but 2 were provided
          Array1D();
          ^
tnt/tnt_array1d.h:62:17: note: candidate constructor not viable: requires 1
argument, but 2 were provided
       explicit Array1D(int n);
                ^
tnt/tnt_array1d.h:65:12: note: candidate constructor not viable: requires 1
argument, but 2 were provided
    inline Array1D(const Array1D &A);
           ^
In file included from ccealignmodule.cpp:1:
In file included from ccealignmodule.cpp:32:
In file included from ./ccealignmodule.H:36:
In file included from ./tnt/tnt.h:55:
tnt/tnt_sparse_matrix_csr.h:97:18: error: no matching constructor for
initialization of 'Array1D<int>'
  rowptr_(M, r), colind_(nz, c), dim1_(M), dim2_(N) {}
                 ^       ~~~~~
In file included from ccealignmodule.cpp:1:
In file included from ccealignmodule.cpp:32:
In file included from ./ccealignmodule.H:36:
In file included from ./tnt/tnt.h:41:
tnt/tnt_array1d.h:63:17: note: candidate constructor not viable: no known
conversion from 'const int *' to 'int const' for 2nd argument
       explicit Array1D(int n, const T &a);
                ^
tnt/tnt_array1d.h:64:11: note: candidate constructor not viable: 2nd argument
('const int *') would lose const qualifier
          Array1D(int n, T *a);
          ^
tnt/tnt_array1d.h:61:11: note: candidate constructor not viable: requires 0
arguments, but 2 were provided
          Array1D();
          ^
tnt/tnt_array1d.h:62:17: note: candidate constructor not viable: requires 1
argument, but 2 were provided
       explicit Array1D(int n);
                ^
tnt/tnt_array1d.h:65:12: note: candidate constructor not viable: requires 1
argument, but 2 were provided
    inline Array1D(const Array1D &A);
           ^
2 errors generated.

The same preprocessed source file is compiled by Apple llvm-gcc 4.2.1 from
Xcode 4 and FSF gcc 4.6.0 without errors or warnings.

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