This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Unneccessary warning: argument ... might be clobbered by 'longjmp' or 'vfork'
- From: Christoph Bartoschek <gcc at pontohonk dot de>
- To: GCC-Help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 26 Feb 2006 12:55:03 +0100
- Subject: Unneccessary warning: argument ... might be clobbered by 'longjmp' or 'vfork'
Hi,
I have basicly the following code:
int MinimumBalance(/* ... */
double lambdaBound,
/* ... */)
{
/* ... */
if ((rc = setjmp(place)) != 0) {
BalanceCleanup();
return rc;
}
/* ... */
}
Now I get the following warning:
warning: argument 'lambdaBound' might be clobbered by 'longjmp' or 'vfork'.
This might be true, but when the jongjmp is performed lambdaBound is not used
anymore. Only BalanceCleanup() is called and a value is returned. Why is GCC
still complaining with this message? How to get rid of this, without making
lambdaBound volatile?
In my opinion GCC should be able to detect that lambdaBound is not used after
a jongjmp and that a clobbered value does no harm.
Christoph Bartoschek