Skip to content

compiler: more flexible warning system#424

Open
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:warnings
Open

compiler: more flexible warning system#424
chqrlie wants to merge 1 commit intoc2lang:masterfrom
chqrlie:warnings

Conversation

@chqrlie
Copy link
Copy Markdown
Contributor

@chqrlie chqrlie commented Jan 3, 2026

  • add WarningKind enumeration and simplify Flags structure
  • rename warning_flags.Flags as WarningFlags
  • remove temporary unreachable code hack
  • all targets have all warnings enabled by default
  • extend WarningFlags type with type functions
  • simplify Target.enableWarnings() and Target.disableWarnings()
  • add warnings for const-return-type and idiomatic-parentheses
  • accept both '$warnings unused' and '$warnings no-unused' etc.

@chqrlie chqrlie force-pushed the warnings branch 3 times, most recently from d5b5487 to b854cf0 Compare January 29, 2026 09:26
@chqrlie chqrlie force-pushed the warnings branch 4 times, most recently from f0a772e to c797340 Compare February 10, 2026 19:15
@chqrlie chqrlie force-pushed the warnings branch 2 times, most recently from 26d5039 to e9d9457 Compare February 17, 2026 18:10
@chqrlie chqrlie force-pushed the warnings branch 5 times, most recently from 0f25359 to 0bac7de Compare February 25, 2026 20:17
@chqrlie chqrlie force-pushed the warnings branch 4 times, most recently from 9047df3 to 921edd4 Compare March 10, 2026 15:38
@chqrlie chqrlie force-pushed the warnings branch 2 times, most recently from 9568b9f to 5c1f4d5 Compare March 16, 2026 00:55
@bvdberg
Copy link
Copy Markdown
Member

bvdberg commented Mar 16, 2026

Looking at the branch, I think it makes the system a bit more complex, while not actually offering any real benefit that I see. It does seem to slow down the analysing a little. I prefer going with keep-it-simple..

@chqrlie chqrlie force-pushed the warnings branch 5 times, most recently from c221bb6 to 2c72c63 Compare March 24, 2026 13:49
@chqrlie chqrlie force-pushed the warnings branch 3 times, most recently from 7e74c86 to 4192e4a Compare March 28, 2026 08:23
* add `WarningKind` enumeration and simplify `Flags` structure
* rename `warning_flags.Flags` as `WarningFlags`
* remove temporary unreachable code hack
* all targets have all warnings enabled by default
* extend `WarningFlags` type with type functions
* simplify `Target.enableWarnings()` and `Target.disableWarnings()`
* add warnings for `const-return-type` and `idiomatic-parentheses`
* accept both '$warnings unused' and '$warnings no-unused' etc.
* enable warning/error on unreachable code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants