Skip to content

Commit

Permalink
Don't suggest that :ENTRY label is unused
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed May 18, 2024
1 parent a6bf101 commit 7abcefd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AssemblerWarnings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,8 @@ private List<Warning> Analyzer_Final_Suggestion_0018()
List<Warning> warnings = new();
// Iterate label definitions that are not present in the referenced labels set
foreach ((string labelName, (FilePosition labelPosition, string? labelMacroName))
in labelDefinitionPositions.ExceptBy(referencedLabels, kv => kv.Key))
in labelDefinitionPositions.ExceptBy(referencedLabels, kv => kv.Key)
.Where(kv => !kv.Key.Equals("ENTRY", StringComparison.OrdinalIgnoreCase)))
{
string labelDefinitionText = ':' + labelName;
warnings.Add(new Warning(WarningSeverity.Suggestion, 0018, labelPosition,
Expand Down
1 change: 1 addition & 0 deletions Test/KitchenSink.asm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
; The exact binary output that this program should produce
; is located in KitchenSink.bin

:ENTRY
MVQ rg0, 69

!>
Expand Down

0 comments on commit 7abcefd

Please sign in to comment.