Skip to content

evaluate -Wconditional-uninitialized #2056

@nickdesaulniers

Description

@nickdesaulniers

This came up in an internal discussion, but we recently had a boogaloo because of some uninitialized value. It looks like clang could have caught that with -Wconditional-uninitialized, but:

  1. -Wconditional-uninitialized is not part of the -Wuninitialized group (surprising)
  2. The kernel doesn't enable -Wconditional-uninitialized.

I can't recall if we ever evaluated the use of this flag on the kernel or not. I'm curious if we can turn it on or if it has false positives?

Example: https://godbolt.org/z/4G7G5MjGa

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion asked by issue author.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions