From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13341 invoked by alias); 3 Jan 2005 21:16:18 -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 13322 invoked by uid 48); 3 Jan 2005 21:16:14 -0000 Date: Mon, 03 Jan 2005 21:16:00 -0000 From: "austern at apple dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20050103211613.19245.austern@apple.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/19245] New: gcc reject cv-qualifiers in function type typedef X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg00271.txt.bz2 List-Id: For the following code typedef void f(int) const; gcc gives the following error message: foo.cc:1: error: invalid type qualifier for non-member function type foo.cc:1: error: 'const' and 'volatile' function specifiers on 'f' invalid in type declaration That error message is incorrect. As 8.3.5/4 makes it clear, cv-qualifiers are valid in type declarations. 9.3/9 uses a typedef very much like this one in an example. -- Summary: gcc reject cv-qualifiers in function type typedef Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: austern at apple dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-apple-darwin7.7.0 GCC host triplet: powerpc-apple-darwin7.7.0 GCC target triplet: powerpc-apple-darwin7.7.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19245