On 10 February 2013 09:05, Johannes Pfau <[email protected]> wrote: > Am Fri, 8 Feb 2013 14:05:24 +0100 > schrieb Johannes Pfau <[email protected]>: > > > https://gist.github.com/jpf91/4738922 > > > > OK, found it and found a fix. As a result functions in nested structs > can now also have static chains. > > With my changes it's possible that a function in a template instance > has a static chain. So we can have functions which are nested, but > for which we still need to call make_decl_one_only. > > There's a small problem: makeDeclOneOnly has this comment: > > /* Weak definitions have to be public. Nested functions may or > may not be emitted as public even if TREE_PUBLIC is set. > There is no way to tell if the back end implements > make_decl_one_only with DECL_WEAK, so this check is > done first. */ > > and therefore it doesn't mark nested functions as one-only. > > Do you know if that statement is still true for recent gcc versions? I > removed that check and there were no regressions. >
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? -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';
