2009/5/20 Aldy Hernandez <al...@redhat.com>:
> Hi folks.
>
> Before I merge the diagnostics branch I'd like to enable it on the
> testsuite to get us all in the habit of at least being aware of columns.
>
> Joseph Myers suggested enabling it in the compiler instead of the
> testsuite.  Are there any big objections to this?

My only worry is that the testsuite may confuse column and line
numbers and pass/fail tests because of it.

Index: gcc/testsuite/gcc.dg/bogus-column.c
===================================================================
--- gcc/testsuite/gcc.dg/bogus-column.c (revision 0)
+++ gcc/testsuite/gcc.dg/bogus-column.c (revision 0)
@@ -0,0 +1,11 @@
+/* This testcase checks that line numbers are not confused with column
+   numbers.  */
+/* { dg-do compile } */
+/* { dg-options "-fshow-column -fms-extensions -pedantic" } */
+
+/* { dg-bogus "ISO C doesn't support unnamed" "bogus" { target *-*-* } 22 } */
+
+struct {
+  struct a { int x; }; /* { dg-warning "22:ISO C doesn't support unnamed" } */
+  int bar;
+} hot;


Cheers,

Manuel.

Reply via email to