cc65 / cc65

cc65 - a freeware C compiler for 6502 based systems

Home Page:https://cc65.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CC65 "-W" option does not suppress the specified warnings.

BrainSlugs83 opened this issue · comments

Version 2.19 / Windows

Using the command cc65 -Wconst-comparison -Oirs main.c --add-source or even cc65 -Oirs main.c --add-source -Wconst-comparison still results in receiving warnings that should have been suppressed:
main.c:8: Warning: Result of comparison is always false

I've also tried putting a space after the -W before the error name or using quotes. I've checked the repo source and this warning does appear to be associated with this message.

I've noticed the same behavior on other warnings as well. I have been unable to suppress any warnings on CC65 with version 2.19 on Windows.

Of course I've been struggling with this for over a week and as soon as I post this I figure it out.

You have to add "-" in front of the warning to suppress also; e.g.:
cc65 -W -const-comparison -Oirs main.c --add-source

I guess I'd like to change this request to update the help text as this is not clear at all from the documentation or the help text.

To me it sounds like the preferred solution would be to change it to work like you said above