Skip to content

Get rid of compiler warnings (paying technical debt) #1255

@mpilman

Description

@mpilman

Under Linux+OS X we don't have any compilation warnings. But the reason for that is simply because I chose the compilation flags in a way that suppresses these warnings. However, some of these warnings would be very useful. This can be seen on Windows: compilation there generates thousands of warnings.

Not having these useful warnings enabled is bothering me: every bug the compiler can find is a bug I don't have to track down in a simulation run.

The obvious problem with enabling more warnings is, that they will just be ignored as it will be too overwhelming seeing so many of those. I would suggest the following strategy:

  1. We should come up with a number of warnings we want to enable in gcc/clang/vsc
  2. Each Apple/Snowflake developer takes one or two of these flags, enables it on their fork and fixes all occurrences. I would not be surprised, if this would unearth a few bugs.
  3. Enable all these warnings by default and compile with -Werror
  4. Celebrate the fact that we will have a cleaner code-base and that the compiler will find more bugs for us.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions