From: "A.Appleyard" To: DJGPP AT DELORIE DOT COM Date: Tue, 26 Mar 1996 11:16:18 GMT Subject: -O3 says that longjmp may clobber variables Message-ID: <11D54ED67C1@fs2.mt.umist.ac.uk> I have a big djgpp program, that compiled with -Wall with no remarks. I recently compiled it with -O3 -Wall, and got warnings of this type:- main.cc:33: warning: variable `class buffer * C' might be clobbered by `longjmp' or `vfork' macros.cc:397: warning: variable `class val *const this' might be clobbered by `longjmp' or `vfork' Broeker AT physik DOT rwth-aachen DOT de referred me to the `-W' node of gcc.info, which advised me to put `volatile' before the affected variables, which I then did (except with the warnings about `this'), and recompiled with -O3 -Wall. The above warnings did not go away, but merely became this type:- main.cc:33: warning: variable `volatile class buffer * C' might be clobbered by `longjmp' or `vfork' and many new warnings of this type appeared:- main.cc:38: warning: passing `volatile char *' as argument 1 of `strcmp(const char *, const char *)' discards volatile And how do I put `volatile' before the `this' of a class member function? I also got this new warning:- main.cc:37: warning: assignment to `volatile char **' from `char **' adds cv-quals without intervening `const' What is a cv-qual?