This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33558] New: 'mutable' incorrectly accepted on reference members
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Sep 2007 03:13:15 -0000
- Subject: [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
7.1.1/8 says that 'mutable' can't be applied to reference members:
The mutable specifier can be applied only to names of
class data members (_class.mem_) and cannot be applied to names
declared const or static, and cannot be applied to reference members.
Yet gcc accepts this code:
----------------
class X {
mutable int &q;
};
----------------
This would seem to be in error.
W.
--
Summary: 'mutable' incorrectly accepted on reference members
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bangerth at dealii dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558