help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem building netcdf-1.0.0 on Mac OS 10.8 using recent compilers.


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

Dear Alexander,

Can you test the (revised) attached code?

Thanks you very much,
Alex


On Thu, Aug 29, 2013 at 3:57 PM, Alexander Hansen <address@hidden> wrote:
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

That triggers the error here:

$ 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 for

      C-style cast from 'octave_int<unsigned long long>' to 'size_t'
      (aka 'unsigned long')
  j = (size_t)tmp(0);

      ^~~~~~~~~~~~~~
/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 (); }
  ^
1 error generated.

The results are similar if I change compilers.

--
Alexander Hansen, Ph.D.
Fink User Liaison
My package updates: http://finkakh.wordpress.com/

Attachment: test_cast.cc
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]