This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, testsuite] ignore some "conflicting types for built-in" messages
- From: Paul Koning <paulkoning at comcast dot net>
- To: GCC patches <gcc-patches at gcc dot gnu dot org>
- Cc: Martin Sebor <msebor at gmail dot com>
- Date: Thu, 1 Nov 2018 15:13:43 -0400
- Subject: [PATCH, testsuite] ignore some "conflicting types for built-in" messages
A number of test cases contain declarations like:
void *memcpy();
which currently are silently accepted on most platforms but not on all; pdp11 (and possibly some others) generate a "conflicting types for built-in function" warning.
It was suggested to prune those messages because the test cases where these occur are not looking for the message but are testing some other issue, so the message is not relevant. The attached patch adds dg-prune-output directives to do so.
Ok for trunk?
paul
ChangeLog:
2018-11-01 Paul Koning <ni1d@arrl.net>
* gcc.dg/Walloca-16.c: Ignore conflicting types for built-in
warnings.
* gcc.dg/Wrestrict-4.c: Ditto.
* gcc.dg/Wrestrict-5.c: Ditto.
* gcc.dg/pr83463.c: Ditto.
* gcc.dg/torture/pr55890-2.c: Ditto.
* gcc.dg/torture/pr55890-3.c: Ditto.
* gcc.dg/torture/pr71816.c: Ditto.
Index: gcc.dg/Walloca-16.c
===================================================================
--- gcc.dg/Walloca-16.c (revision 265727)
+++ gcc.dg/Walloca-16.c (working copy)
@@ -1,5 +1,6 @@
/* PR tree-optimization/84224 */
/* { dg-do compile } */
+/* { dg-prune-output "conflicting types for built-in" } */
/* { dg-options "-O0 -Walloca" } */
void *alloca ();
Index: gcc.dg/Wrestrict-4.c
===================================================================
--- gcc.dg/Wrestrict-4.c (revision 265727)
+++ gcc.dg/Wrestrict-4.c (working copy)
@@ -3,6 +3,7 @@
Test to verify that invalid calls to built-in functions declared
without a prototype don't cause an ICE.
{ dg-do compile }
+ { dg-prune-output "conflicting types for built-in" }
{ dg-options "-O2 -Warray-bounds -Wrestrict" } */
void* memcpy ();
Index: gcc.dg/Wrestrict-5.c
===================================================================
--- gcc.dg/Wrestrict-5.c (revision 265727)
+++ gcc.dg/Wrestrict-5.c (working copy)
@@ -2,6 +2,7 @@
functions declared with no prototype are checked for overlap, and that
invalid calls are ignored.
{ dg-do compile }
+ { dg-prune-output "conflicting types for built-in" }
{ dg-options "-O2 -Wrestrict" } */
typedef __SIZE_TYPE__ size_t;
Index: gcc.dg/pr83463.c
===================================================================
--- gcc.dg/pr83463.c (revision 265727)
+++ gcc.dg/pr83463.c (working copy)
@@ -1,5 +1,6 @@
/* PR middle-end/83463 */
/* { dg-do compile } */
+/* { dg-prune-output "conflicting types for built-in" } */
/* { dg-options "-O2 -Wrestrict -Wno-pointer-to-int-cast" } */
int *a;
Index: gcc.dg/torture/pr55890-2.c
===================================================================
--- gcc.dg/torture/pr55890-2.c (revision 265727)
+++ gcc.dg/torture/pr55890-2.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-prune-output "conflicting types for built-in" } */
extern void *memcpy();
int main() { memcpy(); }
Index: gcc.dg/torture/pr55890-3.c
===================================================================
--- gcc.dg/torture/pr55890-3.c (revision 265727)
+++ gcc.dg/torture/pr55890-3.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-prune-output "conflicting types for built-in" } */
void *memmove ();
Index: gcc.dg/torture/pr71816.c
===================================================================
--- gcc.dg/torture/pr71816.c (revision 265727)
+++ gcc.dg/torture/pr71816.c (working copy)
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-prune-output "conflicting types for built-in" } */
void *ext2fs_resize_mem_p;
struct ext2_icount_el {