Hi Steve,

On 26/09/17 00:25, Steve Ellcey wrote:
This is a new version of my patch to fix PR target/79868, where some
error messages are impossible to translate correctly due to how the
strings are dynamically constructed.  It also includes some format
changes in the error messags to make the messages more consistent with
each other and with other GCC errors.  This was worked out with help
from Martin Sebor.  I also had to fix some tests to match the new error
string formats.

Tested on Aarch64 with no regressions, OK to checkin?

Steve Ellcey
sell...@cavium.com


This looks ok to me (but I can't approve) with a nit below.
I assume this has been bootstrapped as well as tested on aarch64.


2017-09-25  Steve Ellcey  <sell...@cavium.com>

        PR target/79868
        * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
        Change argument type on aarch64_process_target_attr call.
        * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
        Change argument type.
        * config/aarch64/aarch64.c (aarch64_attribute_info): Change
        field type.
        (aarch64_handle_attr_arch): Change argument type, use boolean
        argument to use different strings in error calls.
        (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): Change argument type on
        aarch64_process_target_attr call.


2017-09-25  Steve Ellcey  <sell...@cavium.com>

        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.

 /* Handle the ARCH_STR argument to the arch= target attribute.
-   PRAGMA_OR_ATTR is used in potential error messages.  */
+   IS_PRAGMA is used in potential error messages.  */
Please reword this comment to say something along the lines of "IS_PRAGMA is true if 
processing a target pragma rather than a target attribute". Same with other 
occurrences of this change in other functions in this patch. I think the comment above 
aarch64_process_one_target_attr is a pretty good template now.

Thanks,
Kyrill

Reply via email to