On Tue, Apr 21, 2020 at 02:39:12PM +0100, Matthew Malcomson wrote:
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -15909,13 +15909,30 @@ aarch64_conditional_register_usage (void)
>      }
>  }
>  
> +enum cpp17empty_state {
> +    DONT_AVOID = 0,
> +    AVOID = 1,
> +    AVOID_DONE = 3
> +};

Just an option to having a pointer to this enum, I wonder if you couldn't
pass just bool *has_cxx17_empty_base argument, where:
+         if (DECL_ARTIFICIAL (field)
+             && DECL_NAME (field) == NULL_TREE
+             && RECORD_OR_UNION_TYPE_P (TREE_TYPE (field))
+             && DECL_SIZE (field)
+             && integer_zerop (DECL_SIZE (field))
+             && has_cxx17_empty_base)
+           {
+             *has_cxx17_empty_base = true;
+             continue;
+           }
, pass it around like your argument and in the caller do:
+      bool has_cxx17_empty_base = false;
+      int ag_count = aapcs_vfp_sub_candidate (type, &new_mode,
+                                             &has_cxx17_empty_base);
...
+       if (warn_psabi
+           && has_cxx17_empty_base
+           && ((alt = aapcs_vfp_sub_candidate (type, &new_mode,
+                                               NULL))
+               != ag_count)
i.e. just pass NULL for the case when empty bases shouldn't be ignored.

+                   "std=c++17 in GCC 10", type);                               
                                                                   
Shouldn't that be %<-std=c++17%> ?

        Jakub

Reply via email to