From help-octave-request at bevo dot che dot wisc dot edu Thu Nov 2 10:01:00 2000 Subject: clobbered From: "John W. Eaton" To: andy-jacobson at psu dot edu Cc: help-octave at bevo dot che dot wisc dot edu Date: Thu, 2 Nov 2000 10:00:14 -0600 On 2-Nov-2000, Andy Jacobson wrote: | When creating oct files, sometimes the compiler spews out a | bunch of warnings like: | | corto:~/ibex/nlo> mkoctfile -v amebsa.cc | c++ -c -fPIC -I/usr/local/include -I/usr/local/include/octave-2.0.16 -mieee-fp -fno-rtti -fno-exceptions -fno-implicit-templates -g -O2 -Wall amebsa.cc -o amebsa.o | amebsa.cc: In function `class octave_value_list Famebsa(const class octave_value_list &, int)': | amebsa.cc:48: warning: variable `int iter' might be clobbered by `longjmp' or `vfork' | amebsa.cc:51: warning: variable `int targiter' might be clobbered by `longjmp' or `vfork' | amebsa.cc:53: warning: variable `int i' might be clobbered by `longjmp' or `vfork' | amebsa.cc:53: warning: variable `int ihi' might be clobbered by `longjmp' or `vfork' | amebsa.cc:53: warning: variable `int ilo' might be clobbered by `longjmp' or `vfork' | amebsa.cc:54: warning: variable `double ylo' might be clobbered by `longjmp' or `vfork' | amebsa.cc:54: warning: variable `double ynhi' might be clobbered by `longjmp' or `vfork' | amebsa.cc:87: warning: variable `int n' might be clobbered by `longjmp' or `vfork' | /usr/local/include/octave/Array.h:194: warning: variable `int n' might be clobbered by `longjmp' or `vfork' | ...for another 30 lines or so. | | I use the same template .cc file for different codes, but only | some of them give this set of warnings. They do this quite | robustly. Can anyone explain why this is happening, and need I | be concerned that my variables ARE being clobbered? | | The .cc file, containing two functions, follows. Since it is an | adaptation of copyrighted material, I have removed the core of | the routines, leaving the entrance/exit stuff and variable | declarations. After commenting out the lines in your example, it compiled fine on my system (gcc 2.95.2, Debian GNU/Linux). Can you please provide a complete example that demonstrates the problem? The details that you omitted are probably important... jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------