]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
rs6000: Clarify overloaded builtin diagnostic
authorBill Schmidt <wschmidt@linux.ibm.com>
Tue, 23 Nov 2021 16:22:58 +0000 (10:22 -0600)
committerBill Schmidt <wschmidt@linux.ibm.com>
Tue, 30 Nov 2021 23:20:33 +0000 (17:20 -0600)
When a built-in function required by an overloaded function name is not
currently enabled, the diagnostic message is not as clear as it should be.
Saying that one built-in "requires" another is somewhat misleading.  It is
better to explicitly state that the overloaded builtin is implemented by the
missing builtin.

2021-11-23  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Clarify diagnostic.
(altivec_resolve_new_overloaded_builtin): Likewise.

gcc/config/rs6000/rs6000-c.c

index d08bdfec3aee41a8f7352c8c9f848e22d06a5d63..5eeac9d4c064e39c0564a54c9657ab5b03d60aec 100644 (file)
@@ -1946,7 +1946,8 @@ altivec_resolve_overloaded_builtin (location_t loc, tree fndecl,
               non-overloaded function has already been issued.  Add
               clarification of the previous message.  */
            rich_location richloc (line_table, input_location);
-           inform (&richloc, "builtin %qs requires builtin %qs",
+           inform (&richloc,
+                   "overloaded builtin %qs is implemented by builtin %qs",
                    name, internal_name);
          }
        else
@@ -2992,7 +2993,8 @@ altivec_resolve_new_overloaded_builtin (location_t loc, tree fndecl,
               non-overloaded function has already been issued.  Add
               clarification of the previous message.  */
            rich_location richloc (line_table, input_location);
-           inform (&richloc, "builtin %qs requires builtin %qs",
+           inform (&richloc,
+                   "overloaded builtin %qs is implemented by builtin %qs",
                    name, internal_name);
          }
        else