Modify ↓
Ticket #124 (closed defect: fixed)
preprocessor does not cull symbols in expressions when possible
| Reported by: | vapier@… | Owned by: | |
|---|---|---|---|
| Priority: | P1 | Milestone: | |
| Component: | Preprocessor: NASM-compatible | Version: | 0.6.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
i came across a package doing this:
extern RW %define RW.thm (RW + 22032) %define RW.en (RW + 23056) segment .text movd [eax + RW.thm - RW.en], mm2
in theory, this value is calculable ... even though RW is an undefined external symbol, its value will be static which means you should be able to do (RW - RW) and get 0. or in this case, the break down is arithmetically obvious:
.. = RW.thm - RW.en .. = (RW + 22032) - (RW + 23056) .. = 22032 - 23056 .. = -1024
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

(In [2018]) Fix #124: Fully simplify out sym-sym in values (e.g. a symbol minus itself). This could particularly cause false errors if sym is external.