Jonathan Wakely <jwakely.gcc@gmail.com>
PR c++/33558
* decl.c (grokdeclarator): Reject mutable reference members.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168843
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-01-15 Giovanni Funchal <gafunchal@gmail.com>
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR c++/33558
+ * decl.c (grokdeclarator): Reject mutable reference members.
+
2011-01-14 Jason Merrill <jason@redhat.com>
PR c++/47289
error ("const %qs cannot be declared %<mutable%>", name);
storage_class = sc_none;
}
+ else if (TREE_CODE (type) == REFERENCE_TYPE)
+ {
+ permerror (input_location, "reference %qs cannot be declared "
+ "%<mutable%>", name);
+ storage_class = sc_none;
+ }
}
/* If this is declaring a typedef name, return a TYPE_DECL. */
+2011-01-15 Giovanni Funchal <gafunchal@gmail.com>
+ Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR c++/33558
+ * g++.dg/other/pr33558.C: New.
+ * g++.dg/other/pr33558-2.C: New.
+
2011-01-14 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/45934
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fpermissive" } */
+
+class X {
+ mutable int &q; /* { dg-warning "cannot be declared 'mutable'" } */
+};
--- /dev/null
+/* { dg-do compile } */
+
+class X {
+ mutable int &q; /* { dg-error "cannot be declared 'mutable'" } */
+};