Re: GCC and Clang produce undefined references to functions with vague linkage

2012-06-29 Thread John McCall
On Jun 29, 2012, at 2:23 PM, Rafael Espíndola wrote: >> There's no "for a long time" here. The ABI does not allow us to emit these >> symbols with non-coalescing linkage. We're not going to break ABI >> just because people didn't consider a particular code pattern when they >> hacked in devirtual

Re: GCC and Clang produce undefined references to functions with vague linkage

2012-06-29 Thread John McCall
On Jun 29, 2012, at 11:40 AM, Rafael Espíndola wrote: >> But that's pervasively true in C++ — the linker has to eliminate duplicates >> all the time. Idiomatic C++ code ends up plunking down hundreds, if >> not thousands, of inline functions in every single translation unit. This is >> already a

Re: GCC and Clang produce undefined references to functions with vague linkage

2012-06-28 Thread John McCall
On Jun 28, 2012, at 12:12 PM, Joe Buck wrote: > On Thu, Jun 28, 2012 at 02:13:47PM -0400, Rafael Espíndola wrote: > [ problem with visibility for bar::~bar for testcase ] >> $ cat test.h >> struct foo { >> virtual ~foo(); >> }; >> struct bar : public foo { >> virtual void zed(); >> }; >> $ cat de