|
From: | Alexander Barth |
Subject: | Re: Problem building netcdf-1.0.0 on Mac OS 10.8 using recent compilers. |
Date: | Fri, 30 Aug 2013 22:26:56 +0200 |
That triggers the error here:On 8/28/13 1:14 PM, Alexander Barth wrote:
Dear Alexander,
The code tries to casts a unsigned 64-bit integer to a size_t variable.
I tried to reproduce the error that you are seeing, but the attached
code works with my version of clang (Ubuntu clang version 3.0-6ubuntu3
(tags/RELEASE_30/final) (based on LLVM 3.0)) and gcc 4.6.3. I used the
following:
clang++ -c -I/path/to/include/octave-3.6.4/ test_cast.cc
Can you check if you can trigger the error message with the attached
code on your system?
Thanks and regards,
Alexander
$ clang++ -c -I/sw/include/octave-3.6.4/ -I/sw/include ~/Downloads/test_cast.cc
/Users/hansen/Downloads/test_cast.cc:8:7: error: ambiguous conversion forj = (size_t)tmp(0);
C-style cast from 'octave_int<unsigned long long>' to 'size_t'
(aka 'unsigned long')1 error generated.
^~~~~~~~~~~~~~
/sw/include/octave-3.6.4/octave/oct-inttypes.h:777:3: note: candidate function
operator T (void) const { return value (); }
^
/sw/include/octave-3.6.4/octave/oct-inttypes.h:781:3: note: candidate function
operator double (void) const { return double_value (); }
^
/sw/include/octave-3.6.4/octave/oct-inttypes.h:783:3: note: candidate function
operator float (void) const { return float_value (); }
^
The results are similar if I change compilers.
test_cast.cc
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |