public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives
@ 2004-02-29 9:39 amb at gedanken dot demon dot co dot uk
2004-02-29 16:11 ` [Bug preprocessor/14342] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: amb at gedanken dot demon dot co dot uk @ 2004-02-29 9:39 UTC (permalink / raw)
To: gcc-bugs
This is a regression from version 2.x where using the -dD and -C options would
show the comments on the same line as the #define in the output. There is a -CC
option in this gcc that will show the comment on the line that is output by -dD
but it also includes the comment everywhere that the maro is expanded.
For example for the test file:
#define FOO 1 /* foo */
cpp -dD -C gives:
#define FOO 1
while in version 2.95 it gave:
#define FOO 1 /* foo */
This regression breaks the C cross referencing program cxref.
See bug #13726 for related, but different, bug that also breaks cxref.
--
Summary: cpp -C -dD loses comments on same line as #define
directives
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amb at gedanken dot demon dot co dot uk
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/14342] cpp -C -dD loses comments on same line as #define directives
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
@ 2004-02-29 16:11 ` pinskia at gcc dot gnu dot org
2004-03-03 6:21 ` amb at gedanken dot demon dot co dot uk
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-29 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-29 16:11 -------
Invalid as you have to supply the -CC option.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/14342] cpp -C -dD loses comments on same line as #define directives
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
2004-02-29 16:11 ` [Bug preprocessor/14342] " pinskia at gcc dot gnu dot org
@ 2004-03-03 6:21 ` amb at gedanken dot demon dot co dot uk
2004-03-26 15:55 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: amb at gedanken dot demon dot co dot uk @ 2004-03-03 6:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amb at gedanken dot demon dot co dot uk 2004-03-03 06:21 -------
There are now two options in gcc that control how comments that follow a #define
on the same line are output:
-C which ignores the comment totally
-CC which outputs the comment on the -dD output line and everywhere that the
#defined macro is used.
There is no solution that produces the gcc v2.95 output of producing the comment
only on the -dD output line and not where the macro is used.
The cxref program (http://www.gedanken.demon.co.uk/cxref/) uses comments as
documentation for C programs and it uses gcc as the C pre-processor so that it
has valid C code to examine. The problem is that it is now not possible to use
the documentation comment that follows a #define as documentation for it. Using
-C the comment is not seen and using -CC it appears in more than one place
giving incorrect documentation elsewhere.
The combination of -C and -dD is specific enough (and uncommon enough) that
going back to the old behaviour (which has been there since 1997) shouldn't
break anything.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/14342] cpp -C -dD loses comments on same line as #define directives
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
2004-02-29 16:11 ` [Bug preprocessor/14342] " pinskia at gcc dot gnu dot org
2004-03-03 6:21 ` amb at gedanken dot demon dot co dot uk
@ 2004-03-26 15:55 ` pinskia at gcc dot gnu dot org
2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-26 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-26 15:55 -------
Invalid, the old behavior is not coming back, see <http://gcc.gnu.org/ml/gcc-patches/2002-04/
msg00289.html> and <http://gcc.gnu.org/ml/gcc-patches/2000-05/msg00620.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/14342] cpp -C -dD loses comments on same line as #define directives
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
` (2 preceding siblings ...)
2004-03-26 15:55 ` pinskia at gcc dot gnu dot org
@ 2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-13 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-07-13 20:06 -------
Reopening ...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug preprocessor/14342] cpp -C -dD loses comments on same line as #define directives
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
` (3 preceding siblings ...)
2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
@ 2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-13 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-07-13 20:06 -------
... to mark as WON'T FIX.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14342
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-07-13 20:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-29 9:39 [Bug preprocessor/14342] New: cpp -C -dD loses comments on same line as #define directives amb at gedanken dot demon dot co dot uk
2004-02-29 16:11 ` [Bug preprocessor/14342] " pinskia at gcc dot gnu dot org
2004-03-03 6:21 ` amb at gedanken dot demon dot co dot uk
2004-03-26 15:55 ` pinskia at gcc dot gnu dot org
2004-07-13 20:06 ` reichelt at gcc dot gnu dot org
2004-07-13 20:06 ` reichelt 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).