This is the mail archive of the mailing list for the binutils 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: [PATCH] Two level comdat priorities in gold

> It is an entirely different thing to discuss ways to permit actual ODR
> violations.  This example makes clear that your proposal is in fact a
> powerful mechanism to let people mix and match multiple copies of
> functions with the same name in the same binary, as long as those
> functions are inline.  The language forbids this.  It seems that the
> result can be very confusing.  It's like an overload where the
> resolution of the overload depends not on any language rule but rather
> than the specific set of compilation options.  Why should we permit
> this?

If the compiler does drop down out-of-line instances of both
declarations, gold's --detect-odr-violations option should catch it.
Why should we permit it, especially when we know it can lead to a link
error as is?

I suggested that both should be declared static, but perhaps only the
AVX-optimized version needs to be static. That would allow the generic
version to be COMDAT'ed if necessary, avoiding too much code


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