This is the mail archive of the gcc@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]

Re: c++ language question


and here's the patch:

comments?  First time in the c++ front end so I'm still feeling my way
out.

-eric

2000-11-07  Eric Christopher  <echristo@redhat.com>

	* decl.c (init_decl_processing): Change definition of
	__wchar_t to wchar_t.  Remove artificial declaration of
	wchar_t.
	* lex.c: Change instances of __wchar_t to wchar_t.
Index: decl.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl.c,v
retrieving revision 1.704
diff -u -p -w -r1.704 decl.c
--- decl.c	2000/11/03 22:24:21	1.704
+++ decl.c	2000/11/07 19:10:21
@@ -6576,13 +6576,8 @@ init_decl_processing ()
     wchar_type_node = make_signed_type (wchar_type_size);
   else
     wchar_type_node = make_unsigned_type (wchar_type_size);
-  record_builtin_type (RID_WCHAR, "__wchar_t", wchar_type_node);
+  record_builtin_type (RID_WCHAR, "wchar_t", wchar_type_node);
 
-  /* Artificial declaration of wchar_t -- can be bashed */
-  wchar_decl_node = build_decl (TYPE_DECL, get_identifier ("wchar_t"),
-				wchar_type_node);
-  pushdecl (wchar_decl_node);
-
   /* This is for wide string constants.  */
   wchar_array_type_node
     = build_array_type (wchar_type_node, array_domain_type);
Index: lex.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/lex.c,v
retrieving revision 1.220
diff -u -p -w -r1.220 lex.c
--- lex.c	2000/11/02 19:03:58	1.220
+++ lex.c	2000/11/07 19:10:22
@@ -443,7 +443,6 @@ static const struct resword reswords[] =
   { "__typeof__",	RID_TYPEOF,	0 },
   { "__volatile",	RID_VOLATILE,	0 },
   { "__volatile__",	RID_VOLATILE,	0 },
-  { "__wchar_t",	RID_WCHAR,	0 },
   { "asm",		RID_ASM,	D_ASM },
   { "and",		RID_AND,	D_OPNAME },
   { "and_eq",		RID_AND_EQ,	D_OPNAME },
@@ -515,6 +514,7 @@ static const struct resword reswords[] =
   { "virtual",		RID_VIRTUAL,	0 },
   { "void",		RID_VOID,	0 },
   { "volatile",		RID_VOLATILE,	0 },
+  { "wchar_t",          RID_WCHAR,	0 },
   { "while",		RID_WHILE,	0 },
   { "xor",		RID_XOR,	D_OPNAME },
   { "xor_eq",		RID_XOR_EQ,	D_OPNAME },

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