This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] enabling -fshow-column by default
- From: Manuel López-Ibáñez <lopezibanez at gmail dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 20 May 2009 16:39:00 +0200
- Subject: Re: [RFC] enabling -fshow-column by default
- References: <20090520142305.GA14937@redhat.com>
2009/5/20 Aldy Hernandez <aldyh@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.