<html><head><base href="x-msg://631/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is a shame.<div>1. gcc supports nested functions.</div><div>2. gcc supports inlining.</div><div>3. gcc should work with both nested functions and inlining.</div><div><br></div><div>If gcc can handle all of this for C but not M3 then we must be doing something wrong.</div><div>Can we see how similar code fragments behave when expressed in C?<br>
<br><div><div>On Nov 19, 2010, at 4:12 AM, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; ">parse.c:<br>/* don't inline anything, to fix:<br>elego/m3msh/src/M3MiniShell.m3: In function 'M3MiniShell__ProcessParameters':<br>elego/m3msh/src/M3MiniShell.m3:608:0: error: variable '_nonlocal_var_rec.188' might be clobbered by 'longjmp' or 'vfork'<br>*/<br><br><br>I'm very welling to make an extra pass through the IR, and only turn off inlining if I see both nested functions and calls to setjmp/longjmp/fork/vfork.<br>Oh, and a use of a static link.<br>I wouldn't check for their intersection.<br>Most modules wouldn't have any nested functions. And then sometimes nested functions are only nested to limit their use.<br><br>I tried selectively disabling inlining. No luck.<br> I might try again, but don't plan on success there.<br><br><br>OK?<br><br><br>Fixing this "properly" I'm not keen on doing right now either, as I already spent a while trying to figure out how and failed.<br>(not to mention my keenness for evading this issue entirely, such as by using C or having the frontend transform away nested functions...)<br><br><br> - Jay<br></div></span></blockquote></div><br></div></body></html>