devel/tnt: CLANG oddities, some dirty non-C++ conform code?
O. Hartmann
ohartman at zedat.fu-berlin.de
Mon Sep 24 23:52:45 UTC 2012
When compiling a large software package from USGS (called ISIS3) on
FreeBSD using CLANG (3.1 and 3.2 on FreeBSD 9.1-PRE and 10.0-CUR,
respectively) I receive the following sjowed nasty and sticky error.
Compiling the same code with gcc-4.6 works fine, but I guess this is due
to a loose syntax handling of gcc 4.6 C++ compared to CLANG C++, the
latter seems to be very restrictive in checking syntaxes.
Before filing an PR (people do not want to have simple PRs filed
regarding CLANG problems, they reuqest solutions/fixes), I'd like to ask
whether someone has come across this. My C++ knowledge is limited!
[...]
In file included from /usr/local/include/tnt/jama_lu.h:4:
In file included from /usr/local/include/tnt/tnt.h:55:
/usr/local/include/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) {}
^ ~~~~
/usr/local/include/tnt/tnt_array1d.h:63:11: note: candidate constructor
not viable: no known conversion from 'const int *' to 'const int' for
2nd argument;
dereference the argument with *
Array1D(int n, const T &a);
^
/usr/local/include/tnt/tnt_array1d.h:64:11: note: candidate constructor
not viable: 2nd argument ('const int *') would lose const qualifier
Array1D(int n, T *a);
^
/usr/local/include/tnt/tnt_array1d.h:61:11: note: candidate constructor
not viable: requires 0 arguments, but 2 were provided
Array1D();
^
/usr/local/include/tnt/tnt_array1d.h:62:11: note: candidate constructor
not viable: requires single argument 'n', but 2 arguments were provided
explicit Array1D(int n);
^
/usr/local/include/tnt/tnt_array1d.h:65:14: note: candidate constructor
not viable: requires single argument 'A', but 2 arguments were provided
inline Array1D(const Array1D &A);
[...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120924/63f98060/signature.pgp
More information about the freebsd-ports
mailing list