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:
parent
167c441fed
commit
61327c8e5b
@ -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
8
xasm.d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user