This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/33558] New: 'mutable' incorrectly accepted on reference members


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]