On 1/7/19 9:55 AM, Iain Sandoe wrote:
> Hi Martin,
>
> A)
> Some of the builtin-has-attribute tests fail because a sub-set of them need
> symbol alias support.
> Darwin has only support for weak aliases and therefore we need to skip these.
>
> However, the sub-set is small, and I am reluctant to throw out the entire set
> for the sake of a small number, so I propose to wrap that small number in
> #ifndef that can be enabled by targets without the necessary support (Darwin
> is not the only one, just the most frequently tested and therefore often
> “guilty” of finding the problem ;) )
>
> It’s a tricky trade-off between having too many test-cases and having test
> cases that try to cover too many circumstances...
>
> B) [builtin-has-attribute-4.c]
> I am concerned by the diagnostics for the lack of support for the “protected”
> mode (Darwin doesn’t have this, at least at present).
>
> B.1 the reported diagnostic appears on the closing brace of the function,
> rather than on the statement that triggers it (line 233).
> B.2 I think you’re perhaps missing a %< %> pair - there’s no ‘’ around
> “protected".
> B.3. there are a bunch of other lines with the “protected” visibility
> marking, but no diagnostic (perhaps that’s intended, I am not sure).
>
> Addressing B is a separate issue from making the current tests pass, it might
> not be appropriate at this stage .. it’s more of a “head’s up”.
>
> as for the test fixes, OK for trunk?
> Iain
>
> gcc/testsuite/
>
> * c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol
> alias support.
> * c-c++-common/builtin-has-attribute-4.c: Likewise.
> Append match for warning that ‘protected’ attribute is not supported.
>
> diff --git a/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c
> b/gcc/testsuite/c-c++-common/builtin-has-attribute-3.c
OK
jeff