Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* PATCH: Fix the C type parser
@ 2002-04-22 16:58 H . J . Lu
  2002-04-22 19:00 ` Andrew Cagney
  0 siblings, 1 reply; 2+ messages in thread
From: H . J . Lu @ 2002-04-22 16:58 UTC (permalink / raw)
  To: GDB

[-- Attachment #1: Type: text/plain, Size: 83 bytes --]

Here is a patch for

http://sources.redhat.com/ml/gdb/2001-11/msg00019.html


H.J.

[-- Attachment #2: gdb-type.patch --]
[-- Type: text/plain, Size: 2054 bytes --]

2002-04-22  H.J. Lu  (hjl@gnu.org)

	* c-exp.y (typebase): Support
	
	[long|long long|short] [signed|unsigned] [int|]

	and

	signed [long|long long|short] int

--- gdb/c-exp.y.type	Wed Mar  6 22:30:43 2002
+++ gdb/c-exp.y	Mon Apr 22 16:44:55 2002
@@ -807,24 +807,52 @@ typebase  /* Implements (approximately):
 			{ $$ = builtin_type_short; }
 	|	LONG INT_KEYWORD
 			{ $$ = builtin_type_long; }
+	|	LONG SIGNED_KEYWORD INT_KEYWORD
+			{ $$ = builtin_type_long; }
+	|	LONG SIGNED_KEYWORD
+			{ $$ = builtin_type_long; }
+	|	SIGNED_KEYWORD LONG INT_KEYWORD
+			{ $$ = builtin_type_long; }
 	|	UNSIGNED LONG INT_KEYWORD
 			{ $$ = builtin_type_unsigned_long; }
+	|	LONG UNSIGNED INT_KEYWORD
+			{ $$ = builtin_type_unsigned_long; }
+	|	LONG UNSIGNED
+			{ $$ = builtin_type_unsigned_long; }
 	|	LONG LONG
 			{ $$ = builtin_type_long_long; }
 	|	LONG LONG INT_KEYWORD
 			{ $$ = builtin_type_long_long; }
+	|	LONG LONG SIGNED_KEYWORD INT_KEYWORD
+			{ $$ = builtin_type_long_long; }
+	|	LONG LONG SIGNED_KEYWORD
+			{ $$ = builtin_type_long_long; }
+	|	SIGNED_KEYWORD LONG LONG
+			{ $$ = builtin_type_long_long; }
 	|	UNSIGNED LONG LONG
 			{ $$ = builtin_type_unsigned_long_long; }
 	|	UNSIGNED LONG LONG INT_KEYWORD
 			{ $$ = builtin_type_unsigned_long_long; }
+	|	LONG LONG UNSIGNED
+			{ $$ = builtin_type_unsigned_long_long; }
+	|	LONG LONG UNSIGNED INT_KEYWORD
+			{ $$ = builtin_type_unsigned_long_long; }
 	|	SIGNED_KEYWORD LONG LONG
 			{ $$ = lookup_signed_typename ("long long"); }
 	|	SIGNED_KEYWORD LONG LONG INT_KEYWORD
 			{ $$ = lookup_signed_typename ("long long"); }
 	|	SHORT INT_KEYWORD
 			{ $$ = builtin_type_short; }
+	|	SHORT SIGNED_KEYWORD INT_KEYWORD
+			{ $$ = builtin_type_short; }
+	|	SHORT SIGNED_KEYWORD
+			{ $$ = builtin_type_short; }
 	|	UNSIGNED SHORT INT_KEYWORD
 			{ $$ = builtin_type_unsigned_short; }
+	|	SHORT UNSIGNED 
+			{ $$ = builtin_type_unsigned_short; }
+	|	SHORT UNSIGNED INT_KEYWORD
+			{ $$ = builtin_type_unsigned_short; }
 	|	DOUBLE_KEYWORD
 			{ $$ = builtin_type_double; }
 	|	LONG DOUBLE_KEYWORD

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-23  2:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 16:58 PATCH: Fix the C type parser H . J . Lu
2002-04-22 19:00 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox