problems with "clobbered" warnings
Etienne Lorrain
etienne_lorrain@yahoo.fr
Fri Jun 23 02:07:00 GMT 2000
> > I am attempting to get some code to compile with -Wall -Werror. I have
> > just introduced a setjmp() to catch errors...
> >
> > I get warnings like:
> >
> > paxas.c:211: warning: variable `infilename' might be clobbered by
> > `longjmp' or `vfork'...
> >
> > Is there someone who can offer a better description of when a variable
> > may be considered to be clobbered, or a workaround that permits me to
> > shut up just that test without giving up on the uninitialized warning?
>
> The compiler generates those warnings for just about every variable in
> a function that calls setjmp or vfork.
Did not try, but declaring variables as "register" could remove the
warning - because then you say to the compiler that you know setjmp()
may or may not restore value of your registers variables - or disable
allocation of variables in registers.
Just my ÃÂ0.02,
Etienne.
___________________________________________________________
Do You Yahoo!?
Achetez, vendez! ÃÂ votre prix! Sur http://encheres.yahoo.fr
More information about the Gcc-bugs
mailing list