octave-bug-tracker
[Top][All Lists]
Advanced

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

Re: [Octave-bug-tracker] Octave with Clang


From: Michael D. Godfrey
Subject: Re: [Octave-bug-tracker] Octave with Clang
Date: Thu, 06 Mar 2014 11:30:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 03/06/2014 09:57 AM, PrasannaKumar Muralidharan wrote:
A few days back I compiled octave with clang. Did not make any changes
to Makefile. Make check reported 2 failures. Please find them below.

Is this something to look at?

I guess gcc is following gnu89 standard while clang follows c99 by
default. Is this the cause for the problem?

Failure 1:
>>>>> processing /home/i21337/Software/octave/octave/libinterp/corefcn/data.cc-tst
  ***** assert (log2 (complex (0,Inf)), Inf + log2 (i))
!!!!! test failed
ASSERT errors for:  assert (log2 (complex (0, Inf)),Inf + log2 (i))

  Location  |  Observed  |  Expected  |  Reason
     ()        Inf+NaNi   Inf+2.2662i    'NaN' mismatch


Failure 2:
>>>>> processing /home/i21337/Software/octave/octave/scripts/polynomial/roots.m
  ***** assert (roots ([1e-200, -1e200 * 1i, 1]), -1e-200 * 1i)
!!!!! test failed
ASSERT errors for:  assert (roots ([1e-200, -1e200 * 1i, 1]),-1e-200 * 1i)

  Location  |  Observed  |  Expected  |  Reason
     ()           O            E         real != complex


Seeing a huge number of tests passing without any problem I feel
Octave code seems to be portable across compilers. I also found some
warnings which I am planning to report soon.

Thanks and Regards,
PrasannaKumar
This is very useful.  I think that there was a previous attempt at using clang, and the
Mac OS X 10.9 system also includes clang, as does Fedora. 

It may make sense to consider use of clang, where available, as the preferred compiler.

The above problem may not lead to incorrect results, but any use of uninitialized
variables should be eliminated as a matter of principle.

Michael

reply via email to

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