Mail Archives: djgpp/1997/10/17/11:25:56
I have a big djgpp C++ program (a text editor) on several files. When
compiling it in -O2 mode I get varions moans like this:-
main.cc: In function `int main(int, char **)':
main.cc:41: warning: variable `char * T' might be clobbered by `longjmp' or
`vfork'
and I believe the remedy is to declare the offending variables volatile.
e..g. `volatile char*T;'. OK. But in a class member function how on earth do I
declare `this*' as volatile!?
macros.cc:395: warning: variable `class val * this' might be clobbered by
`longjmp' or `vfork'
Confusingly, this line is in a function `void buffer::translate()', and I
would have thought that the current `this*' would be a `class buffer*' not a
`class val*'! The offending line is:-
if(T1.n>0) namemacro(val(1,0),T1,val(Record)); *K=*Record;}
where val() is a constructor for a `class val' that I declared.
- Raw text -