Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious warning messages in generated code #33

Open
2 tasks
alastairreid opened this issue Feb 10, 2025 · 0 comments
Open
2 tasks

Spurious warning messages in generated code #33

alastairreid opened this issue Feb 10, 2025 · 0 comments

Comments

@alastairreid
Copy link

Motivation

Some tools (compilers, formal verification tools) generate a lot of spurious warning messages because of how our code generator works.
These are unsettling for users of the code and, because we respond by disabling many warnings, it may lead to genuine issues being missed.

Some of the issues are

  • Including unnecessary parentheses - especially around equality checks "(x == 42)"
  • Inserting dead code
    - [ ] Default cases in exhaustive switch statements (e.g., when all values of an enumerated type are covered)
    - [ ] Dead variables (or, rather, variables that are written to but not read from)
    - [ ] Possibly: unused variables
    - [ ] Possibly: unused functions
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

No branches or pull requests

1 participant