This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/9621: const int typedef is rejected


The following reply was made to PR c++/9621; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Cc: gcc-bugs@gcc.gnu.org, <patrick.rabau@gs.com>, <gcc-gnats@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/
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]