From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25687 invoked by alias); 8 Feb 2003 00:56:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25673 invoked by uid 71); 8 Feb 2003 00:56:00 -0000 Date: Sat, 08 Feb 2003 00:56:00 -0000 Message-ID: <20030208005600.25672.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Wolfgang Bangerth Subject: Re: c++/9621: const int typedef is rejected Reply-To: Wolfgang Bangerth X-SW-Source: 2003-02/txt/msg00388.txt.bz2 List-Id: The following reply was made to PR c++/9621; it has been noted by GNATS. From: Wolfgang Bangerth To: Falk Hueffner Cc: gcc-bugs@gcc.gnu.org, , Subject: Re: c++/9621: const int typedef is rejected Date: Fri, 7 Feb 2003 18:46:10 -0600 (CST) > > Can some language lawyer comment on whether and why > > type1 typedef type2; > > is legal syntax? > > No, it isn't. typedef is a decl-specifier. They are only allowed as a > sequence at the start of a simple-declaration: So it's a bug that gcc accepts it in C++. In a strange sense, it's then even a regression that it previously only accepted the version without "const" and now accepts both with and without const :-) I'll change the synopsis of the report in a minute. Thanks for your clarification. W. ------------------------------------------------------------------------- Wolfgang Bangerth email: bangerth@ticam.utexas.edu www: http://www.ticam.utexas.edu/~bangerth/