[C++ patch]: anonymous typenames
Nathan Sidwell
nathan@codesourcery.com
Fri Aug 11 02:17:00 GMT 2000
Hi,
I've installed this patch which diagnoses some more violations of
7.1.5.3/1. In this case where you just have
typename T::t;
this popped up in a recent report at
http://gcc.gnu.org/ml/gcc-bugs/2000-07/msg00640.html
built & tested on i686-pc-linux-gnu and approved by Mark
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (check_tag_decl): Diagnose typename's which don't
declare anything.
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.667
diff -c -3 -p -r1.667 decl.c
*** decl.c 2000/08/07 07:13:13 1.667
--- decl.c 2000/08/09 14:39:32
*************** check_tag_decl (declspecs)
*** 6968,6974 ****
{
++found_type;
! if (IS_AGGR_TYPE (value) || TREE_CODE (value) == ENUMERAL_TYPE)
{
my_friendly_assert (TYPE_MAIN_DECL (value) != NULL_TREE, 261);
t = value;
--- 6968,6975 ----
{
++found_type;
! if ((TREE_CODE (value) != TYPENAME_TYPE && IS_AGGR_TYPE (value))
! || TREE_CODE (value) == ENUMERAL_TYPE)
{
my_friendly_assert (TYPE_MAIN_DECL (value) != NULL_TREE, 261);
t = value;
More information about the Gcc-patches
mailing list