From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13729 invoked by alias); 8 Feb 2003 04:16:01 -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 13702 invoked by uid 71); 8 Feb 2003 04:16:00 -0000 Date: Sat, 08 Feb 2003 04:16:00 -0000 Message-ID: <20030208041600.13699.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: c++/9621: const int typedef is rejected Reply-To: Gabriel Dos Reis X-SW-Source: 2003-02/txt/msg00396.txt.bz2 List-Id: The following reply was made to PR c++/9621; it has been noted by GNATS. From: Gabriel Dos Reis To: Wolfgang Bangerth Cc: Falk Hueffner , gcc-bugs@gcc.gnu.org, , Subject: Re: c++/9621: const int typedef is rejected Date: 08 Feb 2003 05:06:25 +0100 Wolfgang Bangerth writes: | > > 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++. *No*. GCC is correct in accepting it. That is what C and C++ standards require. | I'll change the synopsis of the report in a minute. Thanks for your | clarification. Please, don't do that! Is it an error not to accept int const typede T; It is an error to reject int typedef T; -- Gaby