[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation warnings in liboctave/CMatrix.cc
From: |
John W. Eaton |
Subject: |
Re: compilation warnings in liboctave/CMatrix.cc |
Date: |
Thu, 13 Jan 2011 17:57:46 -0500 |
On 13-Jan-2011, CdeMills wrote:
|
|
| 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;
What problem does this solve? I don't see any warnings when compiling
dbleLU.cc.
jwe
Re: compilation warnings in liboctave/CMatrix.cc, Jordi GutiƩrrez Hermoso, 2011/01/13