Skip to content

Default -Wall -Werror and the skipped errors #33

Description

@mgeplf

@wizmer copied the flags from:
https://github.com/BlueBrain/hpc-coding-conventions/blob/master/cpp/cmake/bob.cmake#L192

What is the plan for choosing what is on that list and what is not?

As the compilers have become more feature-ful, and more aggressive with optimizations, my defensive programming sensibilities have kicked in even stronger. Turning on -Wall & -Werror seems like a necessity to me (with the caveat that one can choose to only enable them for non-Release builds - but the CI should run those for testing).

With that in mind, I like to try and keep the list of exceptions minimal. On that list, for instance, I think -Wswitch-enum is an important warning: the fact that one has to make some switch statements have to be complete is outweighed by missing cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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