octave-maintainers
[Top][All Lists]
Advanced

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

Re: compilation warnings in liboctave/CMatrix.cc


From: CdeMills
Subject: Re: compilation warnings in liboctave/CMatrix.cc
Date: Fri, 14 Jan 2011 00:03:02 -0800 (PST)


John W. Eaton wrote:
> 
> On 13-Jan-2011, CdeMills wrote:
> 
> | The following patch remove the warning in dbleLU.cc:
> | diff -r a1deab9a6e71 liboctave/dbleLU.cc
> | --- a/liboctave/dbleLU.cc   Wed Jan 12 03:40:19 2011 -0500
> | +++ b/liboctave/dbleLU.cc   Thu Jan 13 23:12:55 2011 +0100
> | @@ -77,7 +77,12 @@
> |  
> |    octave_idx_type info = 0;
> |  
> | -  F77_XFCN (dgetrf, DGETRF, (a_nr, a_nc, tmp_data, a_nr, pipvt, info));
> | +  // F77_XFCN contains a setjmp() -- save and restore mn trough a
> volative
> | +  {
> | +    volatile octave_idx_type saved_mn = mn;
> | +    F77_XFCN (dgetrf, DGETRF, (a_nr, a_nc, tmp_data, a_nr, pipvt,
> info));
> | +    mn = saved_mn;
> | +  }
> |  
> |    for (octave_idx_type i = 0; i < mn; i++)
> |      pipvt[i] -= 1;
> 
> What problem does this solve?  I don't see any warnings when compiling
> dbleLU.cc.
> 
> 
> 

According to libc doc, variables might be clobbered around setjmp() call,
except if they are declared 'volatile'. I got warnings about mn at the time
of the original message. With the source pulled yersterday morning, those
warnings disappeared. One less problem.

Regards

Pascal
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/compilation-warnings-in-liboctave-CMatrix-cc-tp3215607p3217248.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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