This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.0.1 patch] fix for 20907: long comments throw off line numbers
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dpatel at apple dot com
- Date: 22 Apr 2005 17:02:57 -0700
- Subject: Re: [4.0.1 patch] fix for 20907: long comments throw off line numbers
- References: <42687D41.2060300@bothner.com>
Per Bothner <per@bothner.com> writes:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907
> I've checked the attached patch into mainline.
> Now that 4.0 is released, should I check it into
> the 4.0 branch? It seems quite safe.
It's missing a testcase, though. Fortunately, I happen to have one
right here that just needs to be put in the right directory (written
by Devang):
Index: gcc/testsuite/gcc.apple/very-long-comment.c
===================================================================
RCS file: gcc/testsuite/gcc.apple/very-long-comment.c
diff -N gcc/testsuite/gcc.apple/very-long-comment.c
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- gcc/testsuite/gcc.apple/very-long-comment.c 21 Apr 2005 18:25:30 -0000
***************
*** 0 ****
--- 1,14 ----
+ /*
+ This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment. This is a really long comment.
+ */
+ #warning test warning /* { dg-warning "test warning" } */
+ #include <stdio.h>
+
+ int main()
+ {
+ printf("This is line %d\n", __LINE__);
+ return 0;
+ }
+
+ /* { dg-options "-Wall" } */
+ /* { dg-do compile } */