From bug-octave-request at octave dot org Tue Apr 27 07:57:49 2004 Subject: Re: compile failure i686 Linux gcc 3.4.0 From: David Bateman To: bug at octave dot org Date: Tue, 27 Apr 2004 14:53:15 +0200 --raC6veAxrt5nqIoY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I don't have gcc 3.4.0 installed yet, but I've heard that gcc 3.40 is much pickier about what it interprets as a typename. Therefore in the template octave_sort gcc 3.4.0 doesn't interpret vec_index as a type and thus "<" and ">" are interpreted as less and greater than. This explains the bizarre error message. The solution is to explicitly tell gcc that vec_index is a typename with template octave_sort I attach a patch for this, but as I say I don't have gcc 3.4.0 installed, so I'd appreciate if you can test it. Regards David -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary --raC6veAxrt5nqIoY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch --- sort.cc~ 2004-04-27 14:44:56.000000000 +0200 +++ sort.cc 2004-04-27 14:47:03.000000000 +0200 at @ -68,8 +68,8 @@ return (a->vec < b->vec); } -template octave_sort; -template octave_sort; +template octave_sort; +template octave_sort; #else struct vec_index { at @ -89,8 +89,8 @@ return (xisnan(b->vec) || (a->vec < b->vec)); } -template octave_sort; -template octave_sort; +template octave_sort; +template octave_sort; #endif struct complex_vec_index at @ -105,7 +105,7 @@ return (xisnan(b->vec) || (abs(a->vec) < abs(b->vec))); } -template octave_sort; +template octave_sort; static octave_value_list mx_sort (NDArray &m, bool return_idx, int dim) --raC6veAxrt5nqIoY-- ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------