This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: problems with "clobbered" warnings
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Re: problems with "clobbered" warnings
- From: Etienne Lorrain <etienne_lorrain at yahoo dot fr>
- Date: Fri, 23 Jun 2000 11:07:38 +0200 (CEST)
> > 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