public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives
@ 2004-01-18  1:22 neroden at gcc dot gnu dot org
  2004-01-18  2:06 ` [Bug preprocessor/13726] " dhazeghi at yahoo dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-01-18  1:22 UTC (permalink / raw)
  To: gcc-bugs

Not really critical, but it is a regression from 2.95 and is known to break 
some programs, notably one called cxref.  :-( 
 
Put this in test.c: 
#include "test.h" /* comment */ 
 
(Put anything in test.h) 
 
cpp -C -dI outputs 
#include "test.h" 
losing the comment.

-- 
           Summary: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on
                    same line as #include directives
           Product: gcc
           Version: 3.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: neroden at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug preprocessor/13726] [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
@ 2004-01-18  2:06 ` dhazeghi at yahoo dot com
  2004-01-18 17:08 ` pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: dhazeghi at yahoo dot com @ 2004-01-18  2:06 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dhazeghi at yahoo dot com  2004-01-18 02:06 -------
Confirmed with mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-18 02:06:01
               date|                            |


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


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

* [Bug preprocessor/13726] [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
  2004-01-18  2:06 ` [Bug preprocessor/13726] " dhazeghi at yahoo dot com
@ 2004-01-18 17:08 ` pinskia at gcc dot gnu dot org
  2004-02-15 12:39 ` gdr at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-18 17:08 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.3.3


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


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

* [Bug preprocessor/13726] [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
  2004-01-18  2:06 ` [Bug preprocessor/13726] " dhazeghi at yahoo dot com
  2004-01-18 17:08 ` pinskia at gcc dot gnu dot org
@ 2004-02-15 12:39 ` gdr at gcc dot gnu dot org
  2004-03-01  1:45 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-02-15 12:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-02-15 12:39 -------
Adjust miletsone

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.3                       |3.3.4


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


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

* [Bug preprocessor/13726] [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-02-15 12:39 ` gdr at gcc dot gnu dot org
@ 2004-03-01  1:45 ` mmitchel at gcc dot gnu dot org
  2004-11-27  2:39 ` [Bug preprocessor/13726] [3.3/3.4/4.0 " neroden at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-01  1:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-01 01:45 -------
This is not a showstopper for any 3.4.x release, although it should be fixed if
possible.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.3.4                       |3.5.0


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-03-01  1:45 ` mmitchel at gcc dot gnu dot org
@ 2004-11-27  2:39 ` neroden at gcc dot gnu dot org
  2005-01-29  0:25 ` echristo at redhat dot com
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: neroden at gcc dot gnu dot org @ 2004-11-27  2:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From neroden at gcc dot gnu dot org  2004-11-27 02:39 -------
libcpp turns off save_comments in start_directive, near the start of 
_cpp_handle_directive (all in directives.c).  This is arguably mistaken, but 
there's probably a reason for it, so I'm loathe to just remove it 
unconditionally.  :-P 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.0 3.4.0                   |4.0.0 3.4.0


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-11-27  2:39 ` [Bug preprocessor/13726] [3.3/3.4/4.0 " neroden at gcc dot gnu dot org
@ 2005-01-29  0:25 ` echristo at redhat dot com
  2005-01-29  0:27 ` echristo at redhat dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: echristo at redhat dot com @ 2005-01-29  0:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-01-29 00:25 -------
Current mainline does this:

[echristo@dzur ~/tmp]$ /dzur/sourceware/builds-gcc/build-dzur/gcc/cc1 -dI -C test.c
In file included from test.c:1:
test.h:1: internal compiler error: in c_lex_with_flags, at c-lex.c:466
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[echristo@dzur ~/tmp]$ cat test.c
#include "test.h" /* this is a comment.  */
[echristo@dzur ~/tmp]$ cat test.h
/* this is another comment.  */

------

I'm investigating.

-- 


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-01-29  0:25 ` echristo at redhat dot com
@ 2005-01-29  0:27 ` echristo at redhat dot com
  2005-01-29  0:34 ` echristo at redhat dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: echristo at redhat dot com @ 2005-01-29  0:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-01-29 00:26 -------
The previous was because i'm an idiot.


-- 


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-01-29  0:27 ` echristo at redhat dot com
@ 2005-01-29  0:34 ` echristo at redhat dot com
  2005-02-01  2:21 ` echristo at redhat dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: echristo at redhat dot com @ 2005-01-29  0:34 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |echristo at redhat dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2004-05-31 00:42:53         |2005-01-29 00:33:48
               date|                            |


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-01-29  0:34 ` echristo at redhat dot com
@ 2005-02-01  2:21 ` echristo at redhat dot com
  2005-02-08 14:26 ` echristo at redhat dot com
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: echristo at redhat dot com @ 2005-02-01  2:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-02-01 02:21 -------
The best I can get without major surgery to cpp is this:

#include "test.h"
<contents of test.h>
                   /* comment from include line  */

Which is likely insufficient for any good needs. I think what we need to be able
to do with cpplib is to put actions on a stack and have them popped at the end
of the directive.

Another option is to have _cpp_push_include (or push_file) finish out the
current buffer before actually pushing out the file. I don't know how well this
will work out in practice though.

Thoughts?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zack at codesourcery dot com


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-02-01  2:21 ` echristo at redhat dot com
@ 2005-02-08 14:26 ` echristo at redhat dot com
  2005-04-21  5:05 ` [Bug preprocessor/13726] [3.3/3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: echristo at redhat dot com @ 2005-02-08 14:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From echristo at redhat dot com  2005-02-08 03:11 -------
cpplib isn't my component and I'd prefer not to implement anything before
knowing that the general idea is ok. reassigning to unassigned.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|echristo at redhat dot com  |unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug preprocessor/13726] [3.3/3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-02-08 14:26 ` echristo at redhat dot com
@ 2005-04-21  5:05 ` mmitchel at gcc dot gnu dot org
  2005-07-08  1:44 ` [Bug preprocessor/13726] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-21  5:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.0                       |4.0.1


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


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

* [Bug preprocessor/13726] [3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-04-21  5:05 ` [Bug preprocessor/13726] [3.3/3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2005-07-08  1:44 ` mmitchel at gcc dot gnu dot org
  2005-09-22 21:42 ` pinskia at gcc dot gnu dot org
  2005-09-27 16:14 ` mmitchel at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-08  1:44 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.1                       |4.0.2


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


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

* [Bug preprocessor/13726] [3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2005-07-08  1:44 ` [Bug preprocessor/13726] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2005-09-22 21:42 ` pinskia at gcc dot gnu dot org
  2005-09-27 16:14 ` mmitchel at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-22 21:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-09-22 21:41 -------
I think this is related to PR 24024.

-- 


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


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

* [Bug preprocessor/13726] [3.4/4.0/4.1 regression]cpp -C -dI loses comments on same line as #include directives
  2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2005-09-22 21:42 ` pinskia at gcc dot gnu dot org
@ 2005-09-27 16:14 ` mmitchel at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


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


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

end of thread, other threads:[~2005-09-27 16:14 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-18  1:22 [Bug preprocessor/13726] New: [3.3/3.4/3.5 regression]cpp -C -dI loses comments on same line as #include directives neroden at gcc dot gnu dot org
2004-01-18  2:06 ` [Bug preprocessor/13726] " dhazeghi at yahoo dot com
2004-01-18 17:08 ` pinskia at gcc dot gnu dot org
2004-02-15 12:39 ` gdr at gcc dot gnu dot org
2004-03-01  1:45 ` mmitchel at gcc dot gnu dot org
2004-11-27  2:39 ` [Bug preprocessor/13726] [3.3/3.4/4.0 " neroden at gcc dot gnu dot org
2005-01-29  0:25 ` echristo at redhat dot com
2005-01-29  0:27 ` echristo at redhat dot com
2005-01-29  0:34 ` echristo at redhat dot com
2005-02-01  2:21 ` echristo at redhat dot com
2005-02-08 14:26 ` echristo at redhat dot com
2005-04-21  5:05 ` [Bug preprocessor/13726] [3.3/3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-07-08  1:44 ` [Bug preprocessor/13726] [3.4/4.0/4.1 " mmitchel at gcc dot gnu dot org
2005-09-22 21:42 ` pinskia at gcc dot gnu dot org
2005-09-27 16:14 ` mmitchel 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).