Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: gcc compiler warning
@ 1998-02-23 14:37 Przemek Klosowski
  1998-02-24  0:31 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Przemek Klosowski @ 1998-02-23 14:37 UTC (permalink / raw)


I've got a program which gets the following warnings when I compile with
   -Wall.  Can anyone tell me what this is trying to say?  How would these
   varibles get "clobbered"?  How can I prevent this?

   function `gpi_EvaluateGeneration':
   gpi.c:336: warning: variable `i' might    be clobbered by `longjmp' or `vfork'

Register-based local variables are not guaranteed to be preserved
across longjump (and also I guess vfork); in other words if you do
setjmp, and then longjmp to it, you aren't guaranteed to see the
values of register-based local variables as they were at time of
setjmp; this is because setjmp/longjmp save/restore the stack only.

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread
* gcc compiler warning
@ 1998-02-23  8:07 Jim. Shipman
  0 siblings, 0 replies; 3+ messages in thread
From: Jim. Shipman @ 1998-02-23  8:07 UTC (permalink / raw)


I've got a program which gets the following warnings when I compile with
-Wall.  Can anyone tell me what this is trying to say?  How would these
varibles get "clobbered"?  How can I prevent this?

This is on Alpha 164LX with linux 4.2
-------------------------------------
function `gpi_EvaluateGeneration':
gpi.c:336: warning: variable `i' might
be clobbered by `longjmp' or `vfork'
gpi.c:340: warning: variable `fit_sum'
might be clobbered by `longjmp' or `vfork'
gpi.c:372: warning: variable
`value' might be clobbered by `longjmp' or
`vfork'
-------------------------------------
Thanks,
Jim

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-02-24  0:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-02-23 14:37 gcc compiler warning Przemek Klosowski
1998-02-24  0:31 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1998-02-23  8:07 Jim. Shipman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox