bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG in operator precedence in as


From: Alan Modra
Subject: Re: BUG in operator precedence in as
Date: Wed, 29 Nov 2000 00:24:42 +1100 (EST)

On Tue, 28 Nov 2000, Mikulas Patocka wrote:

> There is bug in operator precedence in as in newer binutils (2.9.5.0.46
> and 2.10.1.0.2), 2.9.1 is correct but has other bugs. '|' and '+' have the
> same precedence. 

Here's a fix.

gas/ChangeLog
        * expr.c (STANDARD_MUL_PRECEDENCE): Correct value.
        (MRI_MUL_PRECEDENCE): Likewise.
        (op_rank): Fix a comment.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

Index: expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.26
diff -u -p -r1.26 expr.c
--- expr.c      2000/10/30 21:59:01     1.26
+++ expr.c      2000/11/28 13:21:25
@@ -1469,7 +1469,7 @@ static operator_rankT op_rank[] = {
   0,   /* O_symbol */
   0,   /* O_symbol_rva */
   0,   /* O_register */
-  0,   /* O_bit */
+  0,   /* O_big */
   9,   /* O_uminus */
   9,   /* O_bit_not */
   9,   /* O_logical_not */
@@ -1517,8 +1517,8 @@ static operator_rankT op_rank[] = {
    mode.  Also, MRI uses a different bit_not operator, and this fixes
    that as well.  */
 
-#define STANDARD_MUL_PRECEDENCE (7)
-#define MRI_MUL_PRECEDENCE (5)
+#define STANDARD_MUL_PRECEDENCE 8
+#define MRI_MUL_PRECEDENCE 6
 
 void
 expr_set_precedence ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]