🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #6351

Annoyance with vfork and optimization

#6351
From: ldeutsch
Date: Sat, 02 Dec 1995 00:00
20 lines
1243 bytes
(Using GCC 2.7.0)

I'm not sure if this is considered a bug.

When optimizing a program containing vfork() or longjmp(), GCC often 
registerizes variables and then complains that they will be 
clobbered. (fortunately on my system vfork() is actually fork(), so I 
don't need to work)

I think correct behavior would be for GCC to consider vfork() and 
longjmp() before it registerizes variables.

I'd also suggest adding some new flags (say -fsafe-longjmp, 
-fsafe-vfork). One state would be used for OSes with "safe" vfork() 
and longjmp(), in which case these warnings would be suppressed, and 
in the other state the compiler would un-registerize the variables 
and prevent the problem. Of course the "clobber" warning would 
persist when using stupid register allocation.

---- Michael Deutschmann <ldeutsch@netshop.net>
Technical Details
Message-ID: <m0tLmLW-000LryC@netshop.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113d02,e0011f4c2b0a1d0b,start
X-Google-Attributes: gid113d02,public
From: ldeutsch@netshop.net
Subject: Annoyance with vfork and optimization
Date: 1995/12/02
Message-ID: <m0tLmLW-000LryC@netshop.net>
X-Deja-AN: 120710887
distribution: gnu
sender: daemon@cis.ohio-state.edu
organization: GNUs Not Usenet
newsgroups: gnu.gcc.bug