[Bug c++/29993] typdef declaration of cv-qualified function in class

bangerth at dealii dot org gcc-bugzilla@gcc.gnu.org
Thu Nov 30 03:25:00 GMT 2006



------- Comment #2 from bangerth at dealii dot org  2006-11-30 03:24 -------
Confirmed. PR 6628 is indeed fixed, but it appears as if it only has an effect
for typedefs outside class declarations:
---------------------
typedef int ptr1() const; // no error

void foo ()
{
  typedef int ptr2() const; // no error
}

class C
{
    typedef int ptr3() const;  // error

    void bar ()
      {
        typedef int ptr4() const; // no error
      }  
};
-------------------------

g/x> /home/bangerth/bin/gcc-4.2-pre/bin/c++ -c x.cc
x.cc:10: error: ‘const’ and ‘volatile’ function
specifiers on ‘ptr3’ invalid in type declaration

It appears as if Doug's fix for PR 6628 isn't quite complete...

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org,
                   |                            |dgregor at cs dot indiana
                   |                            |dot edu
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-30 03:24:59
               date|                            |


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



More information about the Gcc-bugs mailing list