public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/20907] New: long comments throw off line numbers
@ 2005-04-08 19:12 dpatel at apple dot com
  2005-04-08 20:30 ` [Bug preprocessor/20907] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: dpatel at apple dot com @ 2005-04-08 19:12 UTC (permalink / raw)
  To: gcc-bugs

It seems that long comment blocks can throw off gcc's notion of the source line number. Here is a 
sample test case (also attached in case the line breaks get messed up pasting in):
/*
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
#include <stdio.h>

int main(int argc, char *argv)
{
        printf("This is line %d\n", __LINE__);
}

-- 
           Summary: long comments throw off line numbers
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dpatel at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
@ 2005-04-08 20:30 ` pinskia at gcc dot gnu dot org
  2005-04-08 20:34 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-08 20:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-08 20:30 -------
Confirmed.
This has been broken since at least "gcc version 3.5.0 20040909 (experimental)".

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
      Known to fail|                            |4.0.0 4.1.0
      Known to work|                            |3.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-08 20:30:31
               date|                            |
            Summary|long comments throw off line|[4.0/4.1 Regression] long
                   |numbers                     |comments throw off line
                   |                            |numbers
   Target Milestone|---                         |4.0.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
  2005-04-08 20:30 ` [Bug preprocessor/20907] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-04-08 20:34 ` pinskia at gcc dot gnu dot org
  2005-04-08 20:37 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-08 20:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-08 20:34 -------
This broke between 20040201 and 20040301.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
  2005-04-08 20:30 ` [Bug preprocessor/20907] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
  2005-04-08 20:34 ` pinskia at gcc dot gnu dot org
@ 2005-04-08 20:37 ` pinskia at gcc dot gnu dot org
  2005-04-19 21:30 ` bothner at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-08 20:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-08 20:36 -------
There were quiet a number of cpp patches during that time.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (2 preceding siblings ...)
  2005-04-08 20:37 ` pinskia at gcc dot gnu dot org
@ 2005-04-19 21:30 ` bothner at gcc dot gnu dot org
  2005-04-21 17:09 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-04-19 21:30 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bothner at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-04-08 20:30:31         |2005-04-19 21:30:11
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (3 preceding siblings ...)
  2005-04-19 21:30 ` bothner at gcc dot gnu dot org
@ 2005-04-21 17:09 ` cvs-commit at gcc dot gnu dot org
  2005-04-21 17:22 ` bothner at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-21 17:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-21 17:09 -------
Subject: Bug 20907

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bothner@gcc.gnu.org	2005-04-21 17:08:29

Modified files:
	libcpp         : line-map.c ChangeLog 

Log message:
	PR preprocessor/20907
	* line-map.c (linemap_line_start): Fix bug when we need to increse
	column_bits but can re-use the current line_map.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/line-map.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.diff?cvsroot=gcc&r1=1.67&r2=1.68



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (4 preceding siblings ...)
  2005-04-21 17:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-21 17:22 ` bothner at gcc dot gnu dot org
  2005-04-21 17:27 ` dpatel at apple dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-04-21 17:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bothner at gcc dot gnu dot org  2005-04-21 17:21 -------
Patch checked into mainline; not yet into 4.0 branch.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (5 preceding siblings ...)
  2005-04-21 17:22 ` bothner at gcc dot gnu dot org
@ 2005-04-21 17:27 ` dpatel at apple dot com
  2005-04-21 18:40 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dpatel at apple dot com @ 2005-04-21 17:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dpatel at apple dot com  2005-04-21 17:26 -------
Subject: Re:  [4.0/4.1 Regression] long comments throw off line numbers

Would it be possible for you to add one test case also ?
Thanks,
-
Devang



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0/4.1 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (6 preceding siblings ...)
  2005-04-21 17:27 ` dpatel at apple dot com
@ 2005-04-21 18:40 ` cvs-commit at gcc dot gnu dot org
  2005-04-24 20:05 ` [Bug preprocessor/20907] [4.0 " cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-21 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-21 18:40 -------
Subject: Bug 20907

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	apple-local-200502-branch
Changes by:	dpatel@gcc.gnu.org	2005-04-21 18:40:08

Modified files:
	libcpp         : line-map.c ChangeLog.apple-ppc 
	gcc/testsuite  : ChangeLog.apple-ppc 
Added files:
	gcc/testsuite/gcc.apple: very-long-comment.c 

Log message:
	Radar 4058553
	Backport from FSF Mainline.
	2005-04-19  Per Bothner  <per@bothner.com>
	
	PR preprocessor/20907
	* line-map.c (linemap_line_start): Fix bug when we need to increse
	column_bits but can re-use the current line_map.
	
	* gcc.apple/very-long-comment.c: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/line-map.c.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.1&r2=1.1.52.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.apple-ppc.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.1.4.4&r2=1.1.4.5
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.apple/very-long-comment.c.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.apple-ppc.diff?cvsroot=gcc&only_with_tag=apple-local-200502-branch&r1=1.1.4.22&r2=1.1.4.23



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (7 preceding siblings ...)
  2005-04-21 18:40 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-24 20:05 ` cvs-commit at gcc dot gnu dot org
  2005-04-24 20:32 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-24 20:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-24 20:05 -------
Subject: Bug 20907

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bothner@gcc.gnu.org	2005-04-24 20:05:30

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/cpp: very-long-comment.c 

Log message:
	PR preprocessor/20907
	* gcc.dg/cpp/very-long-comment.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/very-long-comment.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5390&r2=1.5391



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (8 preceding siblings ...)
  2005-04-24 20:05 ` [Bug preprocessor/20907] [4.0 " cvs-commit at gcc dot gnu dot org
@ 2005-04-24 20:32 ` cvs-commit at gcc dot gnu dot org
  2005-04-24 20:37 ` cvs-commit at gcc dot gnu dot org
  2005-04-24 20:44 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-24 20:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-24 20:32 -------
Subject: Bug 20907

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	bothner@gcc.gnu.org	2005-04-24 20:32:32

Modified files:
	libcpp         : line-map.c ChangeLog 

Log message:
	PR preprocessor/20907
	* line-map.c (linemap_line_start): Fix bug when we need to increse
	column_bits but can re-use the current line_map.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/line-map.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1&r2=1.1.54.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.56.2.5&r2=1.56.2.6



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (9 preceding siblings ...)
  2005-04-24 20:32 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-24 20:37 ` cvs-commit at gcc dot gnu dot org
  2005-04-24 20:44 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-04-24 20:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-24 20:37 -------
Subject: Bug 20907

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	bothner@gcc.gnu.org	2005-04-24 20:37:39

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg/cpp: very-long-comment.c 

Log message:
	PR preprocessor/20907
	* gcc.dg/cpp/very-long-comment.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/very-long-comment.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.136&r2=1.5084.2.137



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug preprocessor/20907] [4.0 Regression] long comments throw off line numbers
  2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
                   ` (10 preceding siblings ...)
  2005-04-24 20:37 ` cvs-commit at gcc dot gnu dot org
@ 2005-04-24 20:44 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-24 20:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-24 20:43 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20907


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-04-24 20:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-08 19:12 [Bug preprocessor/20907] New: long comments throw off line numbers dpatel at apple dot com
2005-04-08 20:30 ` [Bug preprocessor/20907] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-08 20:34 ` pinskia at gcc dot gnu dot org
2005-04-08 20:37 ` pinskia at gcc dot gnu dot org
2005-04-19 21:30 ` bothner at gcc dot gnu dot org
2005-04-21 17:09 ` cvs-commit at gcc dot gnu dot org
2005-04-21 17:22 ` bothner at gcc dot gnu dot org
2005-04-21 17:27 ` dpatel at apple dot com
2005-04-21 18:40 ` cvs-commit at gcc dot gnu dot org
2005-04-24 20:05 ` [Bug preprocessor/20907] [4.0 " cvs-commit at gcc dot gnu dot org
2005-04-24 20:32 ` cvs-commit at gcc dot gnu dot org
2005-04-24 20:37 ` cvs-commit at gcc dot gnu dot org
2005-04-24 20:44 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).