public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/3394: Committed: Fix for C99 thinko in c++/3394 fix (but still present on branch) (fwd)
@ 2001-12-03 15:36 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2001-12-03 15:36 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/3394; it has been noted by GNATS.
From: Hans-Peter Nilsson <hp@bitrange.com>
To: <gcc-gnats@gcc.gnu.org>
Cc:
Subject: c++/3394: Committed: Fix for C99 thinko in c++/3394 fix (but still
present on branch) (fwd)
Date: Mon, 3 Dec 2001 18:29:02 -0500 (EST)
(Prepended bug id to subject in an attempt to get it properly
parsed and entered in gnats.)
---------- Forwarded message ----------
Date: Mon, 3 Dec 2001 18:21:52 -0500 (EST)
From: Hans-Peter Nilsson <hp@bitrange.com>
To: mark@codesourcery.com, gcc-patches@gcc.gnu.org, rodrigc@mediaone.net,
khan@nanotech.wisc.edu, gcc-gnats@gcc.gnu.org
Subject: Committed: Fix for C99 thinko in c++/3394 fix (but still present
on branch)
You must not use C99 constructs in gcc (presumably for at least
the next 10 years ;-) not even in non-C front-ends. There
should be some option used to prevent this at build time, so
you'd see a build error in a native bootstrap too. I see the
regression checker has already screamed, presumably at Mumit,
who may be off-line; he wasn't the committer. I also corrected
spacing in that ChangeLog entry (patch at end).
With this patch, cc1plus builds again on i686-pc-linux-gnu -x-
mmix-knuth-mmixware. Committed as obvious on the trunk *BUT NOT
ON THE BRANCH*. I strongly believe it must be fixed there too
before the release, or cross-compiler people will get quite mad,
because we'd have to install gcc-3.0 on the host before
compiling target tool-chains. I'm not sure I'm allowed to touch
the branch, though.
* decl.c (xref_basetypes): Don't use C99 construct in tag_code
declaration and initialization.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.831
diff -p -c -r1.831 decl.c
*** decl.c 2001/12/03 12:50:36 1.831
--- decl.c 2001/12/03 22:45:17
*************** xref_basetypes (code_type_node, name, re
*** 12849,12854 ****
--- 12849,12855 ----
tree base;
int i, len;
+ enum tag_types tag_code;
/* If we are called from the parser, code_type_node will sometimes be a
TREE_LIST. This indicates that the user wrote
*************** xref_basetypes (code_type_node, name, re
*** 12857,12863 ****
if (TREE_CODE (code_type_node) == TREE_LIST)
code_type_node = TREE_VALUE (code_type_node);
! enum tag_types tag_code = (enum tag_types) tree_low_cst (code_type_node, 1);
if (tag_code == union_type)
{
--- 12858,12864 ----
if (TREE_CODE (code_type_node) == TREE_LIST)
code_type_node = TREE_VALUE (code_type_node);
! tag_code = (enum tag_types) tree_low_cst (code_type_node, 1);
if (tag_code == union_type)
{
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
retrieving revision 1.2579
diff -p -c -r1.2579 ChangeLog
*** ChangeLog 2001/12/03 23:15:07 1.2579
--- ChangeLog 2001/12/03 23:17:15
***************
*** 11,18 ****
2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
PR c++/3394
! * decl.c (xref_basetypes): Handle attributes between
! 'class' and name.
2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
--- 11,18 ----
2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
PR c++/3394
! * decl.c (xref_basetypes): Handle attributes between
! 'class' and name.
2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
brgds, H-P
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-12-03 23:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-03 15:36 c++/3394: Committed: Fix for C99 thinko in c++/3394 fix (but still present on branch) (fwd) Hans-Peter Nilsson
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).