<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 10 February 2013 09:05, Johannes Pfau <span dir="ltr"><<a href="mailto:nospam@example.com" target="_blank">nospam@example.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am Fri, 8 Feb 2013 14:05:24 +0100<br>
schrieb Johannes Pfau <<a href="mailto:nospam@example.com">nospam@example.com</a>>:<br>
<br>
> <a href="https://gist.github.com/jpf91/4738922" target="_blank">https://gist.github.com/jpf91/4738922</a><br>
><br>
<br>
OK, found it and found a fix. As a result functions in nested structs<br>
can now also have static chains.<br>
<br>
With my changes it's possible that a function in a template instance<br>
has a static chain. So we can have functions which are nested, but<br>
for which we still need to call make_decl_one_only.<br>
<br>
There's a small problem: makeDeclOneOnly has this comment:<br>
<br>
/* Weak definitions have to be public. Nested functions may or<br>
may not be emitted as public even if TREE_PUBLIC is set.<br>
There is no way to tell if the back end implements<br>
make_decl_one_only with DECL_WEAK, so this check is<br>
done first. */<br>
<br>
and therefore it doesn't mark nested functions as one-only.<br>
<br>
Do you know if that statement is still true for recent gcc versions? I<br>
removed that check and there were no regressions.<br>
</blockquote></div><br></div><div class="gmail_extra">This code logic was from gcc-3.4 times, other changes around that may have made it work by now. Can you pull so I can review?<br clear="all"></div><div class="gmail_extra">
<br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';
</div></div>