On 11/23/2012 03:24 PM, Jason Merrill wrote:
On 11/23/2012 04:58 AM, Florian Weimer wrote:
Okay, this might work in the sense that it flags the relevant cases. I'm
still not convinced that this actually helps programmers that much
because it pretty much separates the two worlds. If this is the intend,
surely there are simpler approaches (such as a command-line flag which
changes the mangling for everything).
It only separates affected code; the idea is that code unaffected by ABI
changes should be able to continue to interoperate normally.
What about code like this?
struct __attribute ((abi_tag ("foo"))) A { };
inline int foo()
{
return sizeof(A);
}
Couldn't this lead to ODR violations? Wouldn't we have to warn about
this case as well?
--
Florian Weimer / Red Hat Product Security Team