Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect signed vs unsigned arithmetic in MEMBASE check #173

Open
phillipstanleymarbell opened this issue Apr 19, 2020 · 0 comments
Open
Assignees

Comments

@phillipstanleymarbell
Copy link
Member

phillipstanleymarbell commented Apr 19, 2020

sf-hitachi-sh.y:2097:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2137:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2178:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2218:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2258:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2296:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:2334:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-hitachi-sh.y:3298:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~

and

sf-riscv.y:2048:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2088:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2129:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2169:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2205:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2253:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2298:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2343:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2388:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2433:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2478:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2535:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2574:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2614:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2654:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2694:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2734:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2770:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2810:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2851:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2891:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2936:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:2981:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3022:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3063:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3104:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3144:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3184:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3225:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3266:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3307:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3348:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3389:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3430:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3475:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3516:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
sf-riscv.y:3556:50: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if (yyengine->cp->PC - yyengine->cp->MEMBASE < 0 ||
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants