From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22366 invoked by alias); 22 Apr 2002 23:58:12 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22335 invoked from network); 22 Apr 2002 23:58:07 -0000 Received: from unknown (HELO rwcrmhc53.attbi.com) (204.127.198.39) by sources.redhat.com with SMTP; 22 Apr 2002 23:58:07 -0000 Received: from ocean.lucon.org ([12.234.143.38]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020422235807.WQAA12144.rwcrmhc53.attbi.com@ocean.lucon.org> for ; Mon, 22 Apr 2002 23:58:07 +0000 Received: by ocean.lucon.org (Postfix, from userid 1000) id 61964125C7; Mon, 22 Apr 2002 16:58:06 -0700 (PDT) Date: Mon, 22 Apr 2002 16:58:00 -0000 From: "H . J . Lu" To: GDB Subject: PATCH: Fix the C type parser Message-ID: <20020422165806.A19528@lucon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline User-Agent: Mutt/1.2.5i X-SW-Source: 2002-04/txt/msg00374.txt.bz2 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 83 Here is a patch for http://sources.redhat.com/ml/gdb/2001-11/msg00019.html H.J. --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="gdb-type.patch" Content-length: 2054 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 --6TrnltStXW4iwmi0--