rs6000: Warn for "GCC vector passed by reference" only with -Wpsabi
authorSegher Boessenkool <segher@kernel.crashing.org>
Wed, 12 Oct 2016 15:09:26 +0000 (17:09 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Wed, 12 Oct 2016 15:09:26 +0000 (17:09 +0200)
* config/rs6000/rs6000.c (rs6000_return_in_memory): Warn for
vector return by reference only if -Wpsabi.
(rs6000_pass_by_reference): Similarly, for argument passing.

From-SVN: r241058

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 35f38fff13ac9de0ad7632efd687e4c55f1826db..ccbe7ac0d0f356cc6d6f2e5863b4ee6238ef8d03 100644 (file)
@@ -1,3 +1,9 @@
+2016-10-12  Segher Boessenkool  <segher@kernel.crashing.org>
+
+       * config/rs6000/rs6000.c (rs6000_return_in_memory): Warn for
+       vector return by reference only if -Wpsabi.
+       (rs6000_pass_by_reference): Similarly, for argument passing.
+
 2016-10-12  David Malcolm  <dmalcolm@redhat.com>
 
        * function-tests.c: Include "print-rtl.h".
index 3a164e9b1c87f5c7d872bc0ba0e98506533e4c15..c816718df9b3e49a40ee5505d83b7b716f35cd16 100644 (file)
@@ -10952,7 +10952,7 @@ rs6000_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
       static bool warned_for_return_big_vectors = false;
       if (!warned_for_return_big_vectors)
        {
-         warning (0, "GCC vector returned by reference: "
+         warning (OPT_Wpsabi, "GCC vector returned by reference: "
                   "non-standard ABI extension with no compatibility guarantee");
          warned_for_return_big_vectors = true;
        }
@@ -12610,7 +12610,7 @@ rs6000_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
        fprintf (stderr, "function_arg_pass_by_reference: synthetic vector\n");
       if (!warned_for_pass_big_vectors)
        {
-         warning (0, "GCC vector passed by reference: "
+         warning (OPT_Wpsabi, "GCC vector passed by reference: "
                   "non-standard ABI extension with no compatibility guarantee");
          warned_for_pass_big_vectors = true;
        }