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: Thu, 13 Jan 2011 14:15:31 -0800 (PST)


John W. Eaton wrote:
> 
> On 13-Jan-2011, CdeMills wrote:
> 
> | Any idea why this message is produced ?
> 
> Part of the answer is that the macro used to call Fortran code inserts
> a call to setjmp for error handling, but I don't know precisely the
> rules that GCC uses to decide when the problem can occur.  When a
> variable is in a register?
> 

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;

Regards

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


reply via email to

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