bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/4801] New: MAXQ warning regarding mem_access_syntax_table


From: svdb+sourceware dot org at stack dot nl
Subject: [Bug binutils/4801] New: MAXQ warning regarding mem_access_syntax_table
Date: 17 Jul 2007 17:51:25 -0000

While compiling binutils with --targets=all, building aborts on opcodes/maxq-
dis.c. (A warning which becomes an error due to -Werror)
/home/svdb/src/binutils-2.17/opcodes/maxq-dis.c: In function 'get_reg_name':
/home/svdb/src/binutils-2.17/opcodes/maxq-dis.c:185: warning: the address of 
'mem_access_syntax_table' will always evaluate as 'true'

The relevant code is:
      for (syntax = mem_access_syntax_table;
           mem_access_syntax_table != NULL || mem_access_syntax_table->name;
           ++syntax)
I suspect it should have been something like
      for (syntax = mem_access_syntax_table;
           syntax != NULL && syntax->name;
           ++syntax)

The warning was triggered by the use of mem_access_syntax_table where (if I am 
not mistaken) it should have been "syntax", but it also looks like the "||" 
should have been a "&&".

-- 
           Summary: MAXQ warning regarding mem_access_syntax_table
           Product: binutils
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: svdb+sourceware dot org at stack dot nl
                CC: bug-binutils at gnu dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=4801

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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