From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6703 invoked by alias); 13 Aug 2003 18:27:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 6683 invoked by uid 48); 13 Aug 2003 18:27:52 -0000 Date: Wed, 13 Aug 2003 18:27:00 -0000 Message-ID: <20030813182752.6681.qmail@sources.redhat.com> From: "ehrhardt at mathematik dot uni-ulm dot de" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20020510135600.6628.ge@cs.twsu.edu> References: <20020510135600.6628.ge@cs.twsu.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/6628] cannot typedef const functions X-Bugzilla-Reason: CC X-SW-Source: 2003-08/txt/msg01577.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=6628 ehrhardt at mathematik dot uni-ulm dot de changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|0000-00-00 00:00:00 |2003-08-13 18:27:52 date| | ------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de 2003-08-13 18:27 ------- Reopened based on http://gcc.gnu.org/ml/gcc-bugs/2003-08/msg01573.html: The following piece of code taken directly from the standard (9.3) shows that the typedef should be legal. ============= cut ===================== typedef void fv(void); typedef void fvc(void) const; struct S { fv memfunc1; // equivalent to: void memfunc1(void); void memfunc2(); fvc memfunc3; // equivalent to: void memfunc3(void) const; }; fv S::* pmfv1 = &S::memfunc1; fv S::* pmfv2 = &S::memfunc2; fvc S::* pmfv3 = &S::memfunc3; ============= cut ===================== However, current mainline gives the following error: thales$ ~/gcc-3.4-cvs/install/bin/g++ 6628.cc 6628.cc:2: error: invalid type qualifier for non-member function type 6628.cc:2: error: `const' and `volatile' function specifiers on `fvc' invalid in type declaration regards Christian