From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8757 invoked by alias); 3 Dec 2001 23:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8742 invoked by uid 71); 3 Dec 2001 23:36:00 -0000 Date: Mon, 03 Dec 2001 15:36:00 -0000 Message-ID: <20011203233600.8741.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Hans-Peter Nilsson Subject: c++/3394: Committed: Fix for C99 thinko in c++/3394 fix (but still present on branch) (fwd) Reply-To: Hans-Peter Nilsson X-SW-Source: 2001-12/txt/msg00260.txt.bz2 List-Id: The following reply was made to PR c++/3394; it has been noted by GNATS. From: Hans-Peter Nilsson To: 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 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 PR c++/3394 ! * decl.c (xref_basetypes): Handle attributes between ! 'class' and name. 2001-12-03 Nathan Sidwell --- 11,18 ---- 2001-12-03 Mumit Khan PR c++/3394 ! * decl.c (xref_basetypes): Handle attributes between ! 'class' and name. 2001-12-03 Nathan Sidwell brgds, H-P