Opened 17 years ago

Closed 17 years ago

Last modified 6 years ago

#8794 closed patch

Two different fixes for the same NASM warnings

Reported by: eriktorbjorn Owned by: eriktorbjorn
Priority: normal Component: --Other--
Version: Keywords:
Cc: Game:

Description

The latest version of NASM (2.01) produces lots and lots of warnings about lines with only a label, and no colon at the end. The colon is supposed to be optional, and earlier versions didn't warn me about it.

There are two possible fixes:

1) Add the "missing" colons. 2) Add -w-orphan-labels to NASMFLAGS

Strangely enough, we already do the latter. But only for MinGW and CygWin. That's one reason why I'm uncertain which is the preferred fix.

Ticket imported from: #1885901. Ticket imported from: patches/899.

Attachments (2)

nasm1.diff (66.3 KB ) - added by eriktorbjorn 17 years ago.
Patch implementing the first fix
nasm2.diff (406 bytes ) - added by eriktorbjorn 17 years ago.
Patch implementing the second fix

Download all attachments as: .zip

Change History (15)

by eriktorbjorn, 17 years ago

Attachment: nasm1.diff added

Patch implementing the first fix

by eriktorbjorn, 17 years ago

Attachment: nasm2.diff added

Patch implementing the second fix

comment:1 by eriktorbjorn, 17 years ago

File Added: nasm2.diff

comment:2 by eriktorbjorn, 17 years ago

Summary: Two different fixes for NASM warningsTwo different fixes for the same NASM warnings

comment:3 by fingolfin, 17 years ago

IMO it would be cleanest to add the colons. But maybe there is indeed a reason they are missing? Kirben, does the first patch work under Windows?

Might also want to ask Eugene.

comment:4 by fingolfin, 17 years ago

Owner: set to Kirben

comment:5 by Kirben, 17 years ago

Compiling a Windows build under mingw still works fine, with the nasm1.diff patch applied.

comment:6 by fingolfin, 17 years ago

Eugene?

comment:7 by fingolfin, 17 years ago

Owner: changed from Kirben to sev-

comment:8 by sev-, 17 years ago

Owner: changed from sev- to eriktorbjorn

comment:9 by sev-, 17 years ago

I would vote for fix 1. Colons are the watchdog for further supported opcodes which could coincidentally match the label names.

Also I have a long time concerns that we still use other x86 ASM fixes in our code, especially in MT-32 which has to keep the code twice(!) in gcc and MSVC syntaxes. It would be really nice if someone would translate that code to NASM syntax.

comment:10 by eriktorbjorn, 17 years ago

So the first patch is ok to commit, then?

comment:11 by eriktorbjorn, 17 years ago

I've committed the first patch, after confirmation from Eugene.

comment:12 by eriktorbjorn, 17 years ago

Status: newclosed

comment:13 by digitall, 6 years ago

Component: --Other--
Note: See TracTickets for help on using tickets.