Date: Tue, 25 Sep 2012 01:52:37 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: Ports FreeBSD <freebsd-ports@freebsd.org> Subject: devel/tnt: CLANG oddities, some dirty non-C++ conform code? Message-ID: <5060F245.3020209@zedat.fu-berlin.de>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig277E28973E3695189AC55379 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable 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); [...] --------------enig277E28973E3695189AC55379 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJQYPJKAAoJEOgBcD7A/5N8H4wH/3d1wYGYrY0VbjOyZkdCQiV6 G0kUrT87VlDD1WrIlb1oxDSly7gfNHXVHbmG8nm5LWak4aTfzL6bYeBFqZf38vkY QepZk3Ye5IphA4t3lV04iAsCvDxlIlh1fomnYVPZnqfe1d4DFzjmVqHT64yhEqJK SwzHnsQSSRyX2VrJILvFGe2MQLY5YBENvfznD42IuYaHGmvIorCEyJ7qH14pFgEs ltuZMZnOCnEs54Zff4aNvj8Shn8ucGbswN/62wuPo89iTNTfPaFHt9JGdvvcui46 QuUoJosyN4QjpA804PrFt4w3MRJ9F22VXucQ3Y/Hl9v62Zj4tcC6XsRvXZ8LByk= =My8Z -----END PGP SIGNATURE----- --------------enig277E28973E3695189AC55379--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5060F245.3020209>