This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: list of "show-stoppers"?
- To: wilson at cygnus dot com
- Subject: Re: list of "show-stoppers"?
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Thu, 01 Jul 1999 16:41:05 -0700
- Cc: robertlipe at usa dot net, law at cygnus dot com, egcs-maintainers at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <19990630085744.H17422@rjlhome.sco.com><199907012205.PAA28362@rtl.cygnus.com>
>>>>> "Jim" == Jim Wilson <wilson@cygnus.com> writes:
Jim> Part of the problem here is that the C++ front end is doing
Jim> odd things with cv-qualified anonymous structures. Search
Jim> for "FIXME: This is bogus" in gcc/cp/decl.c, and note that it
Jim> changes TYPE_NAME (TYPE_MAIN_VARIANT (type)).
I put the following patch on the mainline. I don't see any reason why
it shouldn't go on the branch, but that's for Jeff to decide. Jason
should probably comment as well.
If we do put this on the branch, the patch to `typedef1.C' should go
there as well, or else spurious test-suite failures will be introduced.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
1999-07-01 Mark Mitchell <mark@codesourcery.com>
* decl.c (grokdeclarator): Don't give names "for linkage purposes"
to anonymous cv-qualified types.
Index: testsuite/g++.old-deja/g++.other/debug4.C
===================================================================
RCS file: debug4.C
diff -N debug4.C
--- /dev/null Sat Dec 5 20:30:03 1998
+++ debug4.C Thu Jul 1 16:17:39 1999
@@ -0,0 +1,6 @@
+// Build don't link:
+// Special g++ Options: -g
+
+typedef volatile struct {
+ int i;
+} mutex_t;
Index: testsuite/g++.old-deja/g++.other/typedef1.C
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/testsuite/g++.old-deja/g++.other/typedef1.C,v
retrieving revision 1.2
diff -u -p -r1.2 typedef1.C
--- typedef1.C 1998/12/16 21:53:35 1.2
+++ typedef1.C 1999/07/01 23:17:39
@@ -4,9 +4,9 @@ typedef const struct {
int x;
} Test;
-void foo(Test);
+static void foo(Test);
-void foo(Test t)
+static void foo(Test t)
{
t.x = 0; // ERROR - assignment of read-only member
return;
Index: cp/decl.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl.c,v
retrieving revision 1.375
diff -u -p -r1.375 decl.c
--- decl.c 1999/06/28 03:13:36 1.375
+++ decl.c 1999/07/01 23:26:30
@@ -11064,13 +11064,11 @@ grokdeclarator (declarator, declspecs, d
if (type != error_mark_node
&& TYPE_NAME (type)
&& TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
- && ANON_AGGRNAME_P (TYPE_IDENTIFIER (type)))
+ && ANON_AGGRNAME_P (TYPE_IDENTIFIER (type))
+ && CP_TYPE_QUALS (type) == TYPE_UNQUALIFIED)
{
tree oldname = TYPE_NAME (type);
tree t;
-
- /* FIXME: This is bogus; we should not be doing this for
- cv-qualified types. */
/* Replace the anonymous name with the real name everywhere. */
lookup_tag_reverse (type, declarator);