Skip to content

Compiler output shows incorrect lines/files for unused symbols warning #305

Open
@AGraber

Description

@AGraber

Is this a BUG REPORT, FEATURE REQUEST or QUESTION?:

  • Bug Report
  • Feature Request
  • Question

What happened:
The compiler is returning lines that don't have any relevance to the warning (regarding the update done in 05582c8):

E:\pawn-compiler-bug-demo\gamemodes\demo.pwn(36) : warning 203: symbol is never used: "FadeToWhite"
E:\pawn-compiler-bug-demo\gamemodes\demo.pwn(14) : warning 203: symbol is never used: "LoadedSystems"
E:\pawn-compiler-bug-demo\gamemodes\demo.pwn(16) : warning 203: symbol is never used: "TotalSystems"
E:\pawn-compiler-bug-demo\gamemodes\demo.pwn(16 -- 36) : warning 203: symbol is never used: "log"

What you expected to happen:
Correct files/lines like this:

E:\pawn-compiler-bug-demo\gamemodes\inc\core\impl.inc(40) : warning 203: symbol is never used: "FadeToWhite"
E:\pawn-compiler-bug-demo\gamemodes\inc\core\header.inc(14) : warning 203: symbol is never used: "LoadedSystems"
E:\pawn-compiler-bug-demo\gamemodes\inc\core\header.inc(16) : warning 203: symbol is never used: "TotalSystems"
E:\pawn-compiler-bug-demo\gamemodes\inc\log\header.inc(9) : warning 203: symbol is never used: "log"

How to reproduce it (as minimally and precisely as possible):
Clone AGraber/pawn-compiler-bug-demo, ensure and build with sampctl

Anything else we need to know?:
Although I usually compile with sampctl, I compiled directly with the compiler to make sure this was a compiler bug rather than a sampctl bug.

Also, for some reason, it looks like in unused symbols "LoadedSystems" and "TotalSystems", it gets the line numbers correctly, but the filename is still wrong

Environment:

  • Operating System
    Windows 10 Pro Insider Preview Build 17672.rs_prerelease.180511-1445
  • Compiler version
    3.10.7
  • How are you invoking the compiler? Pawno, Sublime, vscode, sampctl or command-line?
    Command-line for the purpose of this issue (using the --dryRun output of sampctl).
  • If using sampctl, the version number
    1.7.19

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions