From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28116 invoked by alias); 26 Sep 2007 03:13:28 -0000 Received: (qmail 28081 invoked by uid 48); 26 Sep 2007 03:13:15 -0000 Date: Wed, 26 Sep 2007 03:13:00 -0000 Subject: [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at dealii dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-09/txt/msg02119.txt.bz2 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