rsgbds icon indicating copy to clipboard operation
rsgbds copied to clipboard

Use common warning flag code for all four programs

Open Rangi42 opened this issue 1 year ago • 1 comments

Only RGBASM supports -W for warnings, but all four programs could potentially benefit from opt-out and opt-in warnings, as was discussed re: RGBGFX.

The warning code would need to support -Wflag, -Wno-flag, -Werror, -Wno-error, -Werror=flag, and -Wno-error=flag, as well as "error groups" like all, extra, and everything.

Rangi42 avatar Dec 24 '24 17:12 Rangi42

For those who don't use Discord: The original suggestion was to emit a diagnostic if someone passes -t (make tilemap) without -u (remove duplicate tiles). One reply pointed out that -a to make an attribute map without -t or -u makes sense in some scenarios targeting GBC. Rangi42 mentioned more scenarios where a user might want a diagnostic:

  • specifying -u redundantly alongside -X (remove duplicates with horizontal flipping) or -Y (remove duplicates with vertical flipping)
  • -s 3 (three colors per subpalette)
  • -s 2 (two colors per subpalette) with -d 2 (2 bits per pixel)
  • multiple RGB888 colors getting mapped to the same RGB555 color

She also pointed out that users are likely to want to silence diagnostics if they know what they're doing, such as wanting to reserve the fourth color across multiple subpalettes, though the options to do so might use up a lot of short option letters. ISSOtm reminded the group that RGBASM has a perfectly good option flag to control diagnostics: -W.

+1 because applying -W across the entire suite would probably be the least astonishing thing.

pinobatch avatar Dec 24 '24 18:12 pinobatch