public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp
@ 2004-05-22 18:50 jimc at f5 dot com
2004-05-22 19:28 ` [Bug preprocessor/15572] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: jimc at f5 dot com @ 2004-05-22 18:50 UTC (permalink / raw)
To: gcc-bugs
The following script snippet runs on Solaris, but not on our
newer Linux boxes.
$ cat bug
# Calculate the Verilog sensitivity list for
# the (optional) non-registered FIFO read logic.
SLIST=""
if [[ $REG -eq 0 ]] ; then
SLIST=`awk "BEGIN {for (ii=0; ii<10; ii=ii+1) \
print \"or fdhold[\", ii, \"] \"}" </dev/null`
fi
echo TEST | cpp -C -P -undef -DTEST="$SLIST"
Solaris:
$ cpp --version
2.95.3
$ ksh bug
or fdhold[ 0 ]
or fdhold[ 1 ]
or fdhold[ 2 ]
or fdhold[ 3 ]
or fdhold[ 4 ]
or fdhold[ 5 ]
or fdhold[ 6 ]
or fdhold[ 7 ]
or fdhold[ 8 ]
or fdhold[ 9 ]
$
Linux:
$ cpp --version
cpp --version
cpp (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ksh bug
ksh bug
or fdhold[ 0 ]
$
It appears that newlines in a -D behave differently now, but the man page
for cpp (still) states:
-D name=definition
Predefine name as a macro, with definition definition. There are
no restrictions on the contents of definition...
which would lead us to believe that the older cpp is 'correct'.
******************************************************************************
Also, adding -traditional to the cpp invocation crashes the newer version.
$ cat bug
# Calculate the Verilog sensitivity list for
# the (optional) non-registered FIFO read logic.
SLIST=""
if [[ $REG -eq 0 ]] ; then
SLIST=`awk "BEGIN {for (ii=0; ii<10; ii=ii+1) \
print \"or fdhold[\", ii, \"] \"}" </dev/null`
fi
echo TEST | cpp -traditional -C -P -undef -DTEST="$SLIST"
Solaris:
$ cpp --version
2.95.3
$ ksh bug
or fdhold[ 0 ]
or fdhold[ 1 ]
or fdhold[ 2 ]
or fdhold[ 3 ]
or fdhold[ 4 ]
or fdhold[ 5 ]
or fdhold[ 6 ]
or fdhold[ 7 ]
or fdhold[ 8 ]
or fdhold[ 9 ]
$
Linux:
$ cpp --version
cpp --version
cpp (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ ksh bug
:1: internal error in rescan, at tradcpp.c:1575
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
$
-- Jim Cathey (jimc@f5.com)
--
Summary: multi-line -D value no longer works in cpp
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jimc at f5 dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
@ 2004-05-22 19:28 ` pinskia at gcc dot gnu dot org
2004-05-26 20:04 ` [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-22 19:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-21 19:24 -------
Well the ICE has been fixed since 3.3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
2004-05-22 19:28 ` [Bug preprocessor/15572] " pinskia at gcc dot gnu dot org
@ 2004-05-26 20:04 ` pinskia at gcc dot gnu dot org
2004-06-06 3:59 ` giovannibajo at libero dot it
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-26 20:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-26 13:39 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |3.3.3 3.4.0 3.5.0
Known to work| |2.95.3
Last reconfirmed|0000-00-00 00:00:00 |2004-05-26 13:39:48
date| |
Summary|multi-line -D value no |[3.3/3.4/3.5 Regression]
|longer works in cpp |multi-line -D value no
| |longer works in cpp
Target Milestone|--- |3.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
2004-05-22 19:28 ` [Bug preprocessor/15572] " pinskia at gcc dot gnu dot org
2004-05-26 20:04 ` [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-06-06 3:59 ` giovannibajo at libero dot it
2004-06-19 17:48 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-06 3:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-06-06 03:59 -------
Retargeting to 3.4.1, being a regression on that release branch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |gdr at gcc dot gnu dot org
Target Milestone|3.3.4 |3.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (2 preceding siblings ...)
2004-06-06 3:59 ` giovannibajo at libero dot it
@ 2004-06-19 17:48 ` mmitchel at gcc dot gnu dot org
2004-06-26 8:43 ` neil at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-19 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-06-19 17:48 -------
Postponed until GCC 3.4.2.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.1 |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (3 preceding siblings ...)
2004-06-19 17:48 ` mmitchel at gcc dot gnu dot org
@ 2004-06-26 8:43 ` neil at gcc dot gnu dot org
2004-06-28 20:28 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: neil at gcc dot gnu dot org @ 2004-06-26 8:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From neil at gcc dot gnu dot org 2004-06-26 08:41 -------
Mine.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Last reconfirmed|2004-05-26 13:39:48 |2004-06-26 08:41:27
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (4 preceding siblings ...)
2004-06-26 8:43 ` neil at gcc dot gnu dot org
@ 2004-06-28 20:28 ` cvs-commit at gcc dot gnu dot org
2004-06-28 20:41 ` [Bug preprocessor/15572] [3.3/3.5 " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-28 20:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-06-28 20:28 -------
Subject: Bug 15572
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: neil@gcc.gnu.org 2004-06-28 20:28:07
Modified files:
gcc : cppinit.c cppexp.c
gcc/doc : cpp.texi cppopts.texi
gcc/testsuite/gcc.dg/cpp: if-mop.c
Added files:
gcc/testsuite/gcc.dg/cpp/trad: comment-3.c
Log message:
PR preprocessor/16192
PR preprocessor/15913
PR preprocessor/15572
* cppexp.c (_cpp_parse_expr): Handle remaining cases where an
expression is missing.
* cppinit.c (post_options): Traditional cpp doesn't do // comments.
* doc/cpp.texi: Don't document what we do for ill-formed expressions.
* doc/cppopts.texi: Clarify processing of command-line defines.
testsuite:
* gcc.dg/cpp/if-mop.c: Two new testcases.
* gcc.dg/cpp/trad/comment-3.c: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppinit.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.297.6.5&r2=1.297.6.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppexp.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.144.6.1&r2=1.144.6.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/cpp.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.65.4.2&r2=1.65.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/cppopts.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.28.4.3&r2=1.28.4.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/if-mop.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3&r2=1.3.54.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (5 preceding siblings ...)
2004-06-28 20:28 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-28 20:41 ` pinskia at gcc dot gnu dot org
2004-07-04 12:58 ` cvs-commit at gcc dot gnu dot org
2004-07-04 12:59 ` neil at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-28 20:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-28 20:40 -------
Fixed in 3.4.1 and Neil is testing for 3.5.0 but is having bootstrap problems even without the patch.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to work|2.95.3 |2.95.3 3.4.1
Summary|[3.3/3.4/3.5 Regression] |[3.3/3.5 Regression] multi-
|multi-line -D value no |line -D value no longer
|longer works in cpp |works in cpp
Target Milestone|3.4.2 |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (6 preceding siblings ...)
2004-06-28 20:41 ` [Bug preprocessor/15572] [3.3/3.5 " pinskia at gcc dot gnu dot org
@ 2004-07-04 12:58 ` cvs-commit at gcc dot gnu dot org
2004-07-04 12:59 ` neil at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-07-04 12:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-07-04 12:57 -------
Subject: Bug 15572
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: neil@gcc.gnu.org 2004-07-04 12:57:51
Modified files:
gcc : ChangeLog
libcpp : ChangeLog expr.c init.c
gcc/doc : cpp.texi cppopts.texi
gcc/testsuite : ChangeLog
gcc/testsuite/gcc.dg/cpp: if-mop.c
Added files:
gcc/testsuite/gcc.dg/cpp/trad: comment-3.c
Log message:
* doc/cpp.texi: Don't document what we do for ill-formed expressions.
* doc/cppopts.texi: Clarify processing of command-line defines.
libcpp:
PR preprocessor/16192
PR preprocessor/15913
PR preprocessor/15572
* expr.c (_cpp_parse_expr): Handle remaining cases where an
expression is missing.
* init.c (post_options): Traditional cpp doesn't do // comments.
testsuite:
* gcc.dg/cpp/if-mop.c: Two new testcases.
* gcc.dg/cpp/trad/comment-3.c: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4281&r2=2.4282
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/ChangeLog.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/expr.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libcpp/init.c.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/cpp.texi.diff?cvsroot=gcc&r1=1.69&r2=1.70
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/cppopts.texi.diff?cvsroot=gcc&r1=1.34&r2=1.35
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3936&r2=1.3937
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/if-mop.c.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/cpp/trad/comment-3.c.diff?cvsroot=gcc&r1=1.1&r2=1.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug preprocessor/15572] [3.3/3.5 Regression] multi-line -D value no longer works in cpp
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
` (7 preceding siblings ...)
2004-07-04 12:58 ` cvs-commit at gcc dot gnu dot org
@ 2004-07-04 12:59 ` neil at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: neil at gcc dot gnu dot org @ 2004-07-04 12:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From neil at gcc dot gnu dot org 2004-07-04 12:59 -------
Fixed in 3.4 and 3.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15572
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-07-04 12:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-22 18:50 [Bug preprocessor/15572] New: multi-line -D value no longer works in cpp jimc at f5 dot com
2004-05-22 19:28 ` [Bug preprocessor/15572] " pinskia at gcc dot gnu dot org
2004-05-26 20:04 ` [Bug preprocessor/15572] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-06 3:59 ` giovannibajo at libero dot it
2004-06-19 17:48 ` mmitchel at gcc dot gnu dot org
2004-06-26 8:43 ` neil at gcc dot gnu dot org
2004-06-28 20:28 ` cvs-commit at gcc dot gnu dot org
2004-06-28 20:41 ` [Bug preprocessor/15572] [3.3/3.5 " pinskia at gcc dot gnu dot org
2004-07-04 12:58 ` cvs-commit at gcc dot gnu dot org
2004-07-04 12:59 ` neil 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).