This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: PATCH to add abi_tag attribute


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]