This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, testsuite, tentative] Explicitly disable pointer <-> int cast warnings for avr?


  The patch fixes a couple of testsuite failures that show up for the
  avr target because it has different sizes for longs and pointers (4
  bytes versus 2), by explicitly disabling the warning for avr.

  Does this make sense? Skipping the test by requiring ptr32plus would
  have worked, but this lets the test run for avr and for compile tests
  that don't look at output, nothing should hopefully break. Is this a
  good strategy in general?


diff --git gcc/testsuite/gcc.dg/torture/pr69352.c gcc/testsuite/gcc.dg/torture/pr69352.c
index ad718b9..cf06383 100644
--- gcc/testsuite/gcc.dg/torture/pr69352.c
+++ gcc/testsuite/gcc.dg/torture/pr69352.c
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-additional-options "-Wno-pointer-to-int-cast" { target { "avr-*-*" } } } */
 int a[10][14], b, c, d, e, f, g, h, i;
 void bar (void);
diff --git gcc/testsuite/gcc.dg/torture/pr71866.c gcc/testsuite/gcc.dg/torture/pr71866.c
index e1b36cb..c074ad4 100644
--- gcc/testsuite/gcc.dg/torture/pr71866.c
+++ gcc/testsuite/gcc.dg/torture/pr71866.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-additional-options "-ftree-pre -fcode-hoisting" } */
+/* { dg-additional-options "-Wno-int-to-pointer-cast" { target { "avr-*-*" } } } */
 typedef unsigned char u8;
 extern unsigned long pci_io_base;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]