C++ PATCH: New parser

Mark Mitchell mark@codesourcery.com
Sat Dec 28 11:57:00 GMT 2002


>> I'm going back to sleep now to keep the Norwalk virus at bay,
>
> Gotta cut back on those raw oysters, buddy!

I'm a vegetarian, so that wasn't it.  Unless someone slipped me an
oyster mickey. :-)

> Autocrasher sees two regressions:
>
>     g++.sum g++.dg/tls/diag-1.C
>     g++.sum g++.dg/tls/diag-2.C

Dang it; forgot to configure with --enable-threads when testing.

I'm testing this fix now, which I'll check in if it works.  It may
take me all day to get this in; if anyone's bothered, feel free to
check this patch in if it works for you.

-- 
Mark Mitchell                mark@codesourcery.com
CodeSourcery, LLC            http://www.codesourcery.com

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.972
diff -c -5 -p -r1.972 decl.c
*** decl.c	28 Dec 2002 08:03:39 -0000	1.972
--- decl.c	28 Dec 2002 19:54:42 -0000
*************** grokdeclarator (declarator, declspecs, d
*** 10434,10450 ****
  			longlong = 1;
  		    }
  		  else if (RIDBIT_SETP (i, specbits))
  		    pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));

! 		  /* Diagnose "__thread extern".  Recall that this list
! 		     is in the reverse order seen in the text.  */
! 		  if (i == (int)RID_THREAD)
  		    {
! 		      if (RIDBIT_SETP (RID_EXTERN, specbits))
  			error ("`__thread' before `extern'");
! 		      if (RIDBIT_SETP (RID_STATIC, specbits))
  			error ("`__thread' before `static'");
  		    }

  		  if (i == (int)RID_EXTERN
  		      && TREE_PURPOSE (spec) == error_mark_node)
--- 10434,10449 ----
  			longlong = 1;
  		    }
  		  else if (RIDBIT_SETP (i, specbits))
  		    pedwarn ("duplicate `%s'", IDENTIFIER_POINTER (id));

! 		  /* Diagnose "__thread extern" or "__thread static".  */
! 		  if (RIDBIT_SETP (RID_THREAD, specbits))
  		    {
! 		      if (i == (int)RID_EXTERN)
  			error ("`__thread' before `extern'");
! 		      else if (i == (int)RID_STATIC)
  			error ("`__thread' before `static'");
  		    }

  		  if (i == (int)RID_EXTERN
  		      && TREE_PURPOSE (spec) == error_mark_node)



More information about the Gcc-patches mailing list