Fix wording for: attribute ‘-xyz’ argument ‘target’ is unknown
authorMartin Liska <mliska@suse.cz>
Thu, 3 Feb 2022 09:19:33 +0000 (10:19 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 3 Feb 2022 09:19:33 +0000 (10:19 +0100)
gcc/ChangeLog:

* config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p):
Change subject and object in the error message.
* config/s390/s390.cc (s390_valid_target_attribute_inner_p):
Likewise.

gcc/config/i386/i386-options.cc
gcc/config/s390/s390.cc

index 715d9a1..082abd2 100644 (file)
@@ -1201,7 +1201,7 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
       if (opt == N_OPTS)
        {
          error_at (loc, "attribute %qs argument %qs is unknown",
-                   orig_p, attr_name);
+                   attr_name, orig_p);
          ret = false;
        }
 
index 63b78ab..5c2a830 100644 (file)
@@ -15903,7 +15903,7 @@ s390_valid_target_attribute_inner_p (tree args,
       /* Process the option.  */
       if (!found)
        {
-         error ("attribute %qs argument %<target%> is unknown", orig_p);
+         error ("attribute %<target%> argument %qs is unknown", orig_p);
          return false;
        }
       else if (attrs[i].only_as_pragma && !force_pragma)
@@ -15953,7 +15953,7 @@ s390_valid_target_attribute_inner_p (tree args,
            }
          else
            {
-             error ("attribute %qs argument %<target%> is unknown", orig_p);
+             error ("attribute %<target%> argument %qs is unknown", orig_p);
              ret = false;
            }
        }
@@ -15970,7 +15970,7 @@ s390_valid_target_attribute_inner_p (tree args,
                        global_dc);
          else
            {
-             error ("attribute %qs argument %<target%> is unknown", orig_p);
+             error ("attribute %<target%> argument %qs is unknown", orig_p);
              ret = false;
            }
        }