c++/3394

Craig Rodrigues rodrigc@mediaone.net
Thu Jul 12 05:16:00 GMT 2001


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

From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org, khan@nanotech.wisc.edu, rodrigc@gcc.gnu.org,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: c++/3394
Date: Thu, 12 Jul 2001 08:14:41 -0400

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=3394&database=gcc
 
 Mumit Khan <khan@nanotech.wisc.edu> has provided the following
 patch to solve the problem described in PR 3394:
 
 Index: gcc/cp/decl.c
 ===================================================================
 RCS file: /homes/khan/src/win32/cygwin/CVSROOT/gcc-3.0/gcc/cp/decl.c,v
 retrieving revision 1.2
 diff -u -3 -p -r1.2 decl.c
 --- gcc/cp/decl.c       2001/06/21 04:44:06     1.2
 +++ gcc/cp/decl.c       2001/06/22 15:15:12
 @@ -12765,6 +12765,14 @@ xref_basetypes (code_type_node, name, re
    tree base;
  
    int i, len;
 +
 +  /* If we are called from the parser, code_type_node will sometimes be a
 +     TREE_LIST.  This indicates that the user wrote
 +     "class __attribute__ ((foo)) bar".  Extract the attributes so that
 +     tree_low_cst doesn't crash.  */
 +  if (TREE_CODE (code_type_node) == TREE_LIST)
 +    code_type_node = TREE_VALUE (code_type_node);
 +
    enum tag_types tag_code = (enum tag_types) tree_low_cst (code_type_node, 1);
  
    if (tag_code == union_type)
 
 -- 
 Craig Rodrigues        
 http://www.gis.net/~craigr    
 rodrigc@mediaone.net          



More information about the Gcc-prs mailing list