[committed] pa: Disable -Warray-bounds in fptr.c

Message ID 7a9b8fbf-c113-0888-e126-077568958d0c@bell.net
State New
Headers show
Series
  • [committed] pa: Disable -Warray-bounds in fptr.c
Related show

Commit Message

John David Anglin Oct. 3, 2019, 11:56 p.m.
We do so non standard stuff in __canonicalize_funcptr_for_compare() to handle
function pointer canonicalization.  The updated -Warray-bounds now causes warnings
about negative array offsets.  This patch disables the warning in this code.

Tested on hppa-unknown-linux-gnu.  Committed to trunk.

Dave

2019-10-03  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/fptr.c: Disable -Warray-bounds warning.

Patch

Index: config/pa/fptr.c
===================================================================
--- config/pa/fptr.c	(revision 276260)
+++ config/pa/fptr.c	(working copy)
@@ -62,6 +62,9 @@ 
   return result;
 }

+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+
 /* __canonicalize_funcptr_for_compare must be hidden so that it is not
    placed in the dynamic symbol table.  Like millicode functions, it
    must be linked into all binaries in order access the got table of
@@ -141,3 +144,5 @@ 

   return plabel[0];
 }
+
+#pragma GCC diagnostic pop