public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33558]  New: 'mutable' incorrectly accepted on reference members
@ 2007-09-26  3:13 bangerth at dealii dot org
  2008-12-31 18:02 ` [Bug c++/33558] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: bangerth at dealii dot org @ 2007-09-26  3:13 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
  2007-09-26  3:13 [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members bangerth at dealii dot org
@ 2008-12-31 18:02 ` pinskia at gcc dot gnu dot org
  2010-01-09 14:18 ` gafunchal at gmail dot com
  2010-01-09 14:19 ` gafunchal at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-31 18:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-12-31 17:59 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-31 17:59:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
  2007-09-26  3:13 [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members bangerth at dealii dot org
  2008-12-31 18:02 ` [Bug c++/33558] " pinskia at gcc dot gnu dot org
@ 2010-01-09 14:18 ` gafunchal at gmail dot com
  2010-01-09 14:19 ` gafunchal at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: gafunchal at gmail dot com @ 2010-01-09 14:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gafunchal at gmail dot com  2010-01-09 14:18 -------
Created an attachment (id=19523)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19523&action=view)
patch


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
  2007-09-26  3:13 [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members bangerth at dealii dot org
  2008-12-31 18:02 ` [Bug c++/33558] " pinskia at gcc dot gnu dot org
  2010-01-09 14:18 ` gafunchal at gmail dot com
@ 2010-01-09 14:19 ` gafunchal at gmail dot com
  2 siblings, 0 replies; 7+ messages in thread
From: gafunchal at gmail dot com @ 2010-01-09 14:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from gafunchal at gmail dot com  2010-01-09 14:18 -------
http://gcc.gnu.org/ml/gcc-patches/2010-01/msg00420.html

-- Giovanni


-- 

gafunchal at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gafunchal at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
       [not found] <bug-33558-4@http.gcc.gnu.org/bugzilla/>
  2010-12-20  9:43 ` redi at gcc dot gnu.org
  2011-01-15 14:51 ` redi at gcc dot gnu.org
@ 2011-01-15 15:17 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-15 15:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-15 14:42:39 UTC ---
Patch approved by Jason at
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00918.html

Fixed for 4.6.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
       [not found] <bug-33558-4@http.gcc.gnu.org/bugzilla/>
  2010-12-20  9:43 ` redi at gcc dot gnu.org
@ 2011-01-15 14:51 ` redi at gcc dot gnu.org
  2011-01-15 15:17 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-01-15 14:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-01-15 14:41:12 UTC ---
Author: redi
Date: Sat Jan 15 14:41:09 2011
New Revision: 168843

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168843
Log:
2011-01-15  Giovanni Funchal  <gafunchal@gmail.com>
        Jonathan Wakely  <jwakely.gcc@gmail.com>

    PR c++/33558
    * decl.c (grokdeclarator): Reject mutable reference members.


Added:
    trunk/gcc/testsuite/g++.dg/other/pr33558-2.C
    trunk/gcc/testsuite/g++.dg/other/pr33558.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/33558] 'mutable' incorrectly accepted on reference members
       [not found] <bug-33558-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-20  9:43 ` redi at gcc dot gnu.org
  2011-01-15 14:51 ` redi at gcc dot gnu.org
  2011-01-15 15:17 ` redi at gcc dot gnu.org
  2 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2010-12-20  9:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33558

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-20 09:43:40 UTC ---
new patch http://gcc.gnu.org/ml/gcc-patches/2010-12/msg01469.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-15 14:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-26  3:13 [Bug c++/33558] New: 'mutable' incorrectly accepted on reference members bangerth at dealii dot org
2008-12-31 18:02 ` [Bug c++/33558] " pinskia at gcc dot gnu dot org
2010-01-09 14:18 ` gafunchal at gmail dot com
2010-01-09 14:19 ` gafunchal at gmail dot com
     [not found] <bug-33558-4@http.gcc.gnu.org/bugzilla/>
2010-12-20  9:43 ` redi at gcc dot gnu.org
2011-01-15 14:51 ` redi at gcc dot gnu.org
2011-01-15 15:17 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).