From bug-request at octave dot org Sun Apr 16 13:30:24 2006 Subject: CVS Compilation with PGI compiler From: "Christopher Hulbert" To: bug at octave dot org Date: Sun, 16 Apr 2006 14:28:42 -0400 Problems with PGI compiler: SparseType.cc lines 95 and 418. PGI didn't like bool found [nrows] complaining nrows wasn't constant. I'm not well-versed with the C++ standard (am with the C) so I'm not sure if it conforms to the standard or not. I fixed with: bool *found = new bool[nrows]; ... delete found /* At the end of the if block */ I'm also having trouble with octave_print_internal in pr-output.cc with calling the abs function for unsigned integer types. I cannot get the PGI C++ compiler to compile this. Does the C++ standard define an abs function for unsigned types? Should I report this as a bug against the PGI c++ compiler? "kpse.cc", line 383: error: "hash" is ambiguous unsigned n = hash (table, key); ^ 1 error detected in the compilation of "pathsearch.cc". Fixed by changing the hash function to octhash. It looks like pgi has a hash function in their STL ($PGI/6.0/include/CC/stl/_string_hash.h,$PGI/6.0/include/CC/stl/_hash_fun.h)? That's what I'm guessing caused the problem anyways. Chris ------------------------------------------------------------- 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 -------------------------------------------------------------