Unneccessary warning: argument ... might be clobbered by 'longjmp' or 'vfork'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux