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: [PATCH 1/3] improve detection of attribute conflicts (PR 81544)


On Tue, 19 Sep 2017, Martin Sebor wrote:

> > In general, the data structures where you need to ensure manually that if
> > attribute A is listed in EXCL for B, then attribute B is also listed in
> > EXCL for A, seem concerning.  I'd expect either data structures that make
> > such asymmetry impossible, or a self-test that verifies that the tables in
> > use are in fact symmetric (unless there is some reason the symmetry is not
> > in fact required and symmetric diagnostics still result from asymmetric
> > tables - in which case the various combinations and orderings of
> > gnu_inline and noinline definitely need tests to show that the diagnostics
> > work).
> 
> If I understand correctly what you're concerned about then I don't
> think there are any such cases in the updated version of the patch.

I don't see how you ensure that it's not possible to have such asymmetry.  
My point wasn't so much "there was a bug in the previous patch version" as 
"the choice of data structures for defining such exclusions is prone to 
such bugs".  Which can be addressed either by using different data 
structures (e.g. listing incompatible pairs in a single array) or by a 
self-test to verify symmetry so a compiler with asymmetry doesn't build.

-- 
Joseph S. Myers
joseph@codesourcery.com


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