On 30/10/17 20:50, Steve Ellcey wrote:
> On Thu, 2017-10-26 at 13:56 +0100, Richard Earnshaw (lists) wrote:
>>
>> I can't help feeling that all this logic is somewhat excessive and
>> changing the wording of each message to include "pragma or attribute"
>> would solve it equally well. With the new context highlighting it's
>> trivial to tell which subcase of usage is being referred to.
>>
>> R.
>
> I have no problem with that. Here is a version that uses "pragma or
> attribute".
>
> Tested on ToT with no regressions. Ok to checkin?
>
> Steve Ellcey
> [email protected]
>
>
>
> ChangeLog:
>
> 2017-10-30 Steve Ellcey <[email protected]>
>
> PR target/79868
> * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
> Remove second argument from aarch64_process_target_attr call.
> * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
> Ditto.
> * config/aarch64/aarch64.c (aarch64_attribute_info): Change
> field type.
> (aarch64_handle_attr_arch): Remove second argument.
> (aarch64_handle_attr_cpu): Ditto.
> (aarch64_handle_attr_tune): Ditto.
> (aarch64_handle_attr_isa_flags): Ditto.
> (aarch64_process_one_target_attr): Ditto.
> (aarch64_process_target_attr): Ditto.
> (aarch64_option_valid_attribute_p): Remove second argument.
> on aarch64_process_target_attr call.
>
>
> Testsuite ChangeLog:
>
> 2017-10-30 Steve Ellcey <[email protected]>
>
> PR target/79868
> * gcc.target/aarch64/spellcheck_1.c: Update dg-error string to match
> new format.
> * gcc.target/aarch64/spellcheck_2.c: Ditto.
> * gcc.target/aarch64/spellcheck_3.c: Ditto.
> * gcc.target/aarch64/target_attr_11.c: Ditto.
> * gcc.target/aarch64/target_attr_12.c: Ditto.
> * gcc.target/aarch64/target_attr_17.c: Ditto.
>
This is looking better...
I may have missed some discussion on this topic, but what's the
reasoning behind changing the quoting around the 'str' parameter value in
- error ("unknown value %qs for 'cpu' target %s", str, pragma_or_attr);
+ error ("invalid name (\"%s\") in %<target(\"cpu=\")%> pragma or
attribute", str);
And also with the new generic message does the %<target(\"cpu=\")%>
still make sense? My feeling is that the original text here is perhaps
more appropriate. Similarly for other messages.
R.