1
0
mirror of https://github.com/pfusik/xasm.git synced 2024-12-21 09:29:39 +00:00

"opt u-" disables "/u" unused label warnings.

This commit is contained in:
Piotr Fusik 2014-04-30 09:19:49 +02:00
parent 167c441fed
commit 61327c8e5b
2 changed files with 9 additions and 2 deletions

View File

@ -275,10 +275,11 @@ Five options are available:
- `H` - generate Atari executable headers
- `L` - write to the listing
- `O` - write to the object file
- `U` - warn of unused labels
+
You can turn any of these on or off.
The default (if no `OPT` specified) is `opt f-g-h+l+o+`.
The default (if no `OPT` specified) is `opt f-g-h+l+o+u+`.
Examples:
+
------------------------------------------------------------------------------

8
xasm.d
View File

@ -48,6 +48,7 @@ bool option5200; // opt g
bool optionHeaders; // opt h
bool optionListing; // opt l
bool optionObject; // opt o
bool optionUnusedLabels; // opt u
string currentFilename;
int lineNo;
@ -2155,6 +2156,10 @@ void assemblyOpt() {
case 'o':
optionObject = readOption();
break;
case 'U':
case 'u':
optionUnusedLabels = readOption();
break;
default:
column--;
return;
@ -2687,7 +2692,7 @@ void assemblyLine() {
assert(label in labelTable);
currentLabel = labelTable[label];
currentLabel.passed = true;
if (currentLabel.unused && getOption('u'))
if (currentLabel.unused && getOption('u') && optionUnusedLabels)
warning("Unused label");
}
}
@ -2827,6 +2832,7 @@ void assemblyPass() {
optionHeaders = true;
optionListing = pass2;
optionObject = true;
optionUnusedLabels = true;
willSkip = false;
skipping = false;
repeatOffset = 0;