Skip to content

clang doesn't emit the same warnings for global variables #92

Description

@nickdesaulniers

Activity

  1. nickdesaulniers commented on Apr 13, 2019

    @nickdesaulniers
    MemberAuthor

    I plan on revisiting this later this quarter.

  2. nickdesaulniers commented on May 2, 2019

    @nickdesaulniers
    MemberAuthor

    Posting what @zygoloid sent me about this:

    I think it should not require major invasive changes to Clang to fix this. While we can't built a CFG for the initializer of a global variable, we don't really need to, since there's never any control flow there (you can't have a statement-expression at global scope). So we could just walk the initializer after attaching it, skip obviously-dead branches in ?: expressions, and emit deferred runtime-behavior diagnostics for the rest. (And ideally we'd skip all of that if we don't have any pending runtime-behavior diagnostics when we reach the end of a global's initializer.)

  3. nickdesaulniers commented on Jul 21, 2019

    @nickdesaulniers
    MemberAuthor
  4. added
    low priorityThis bug is not critical and not a priority
    and removed
    low priorityThis bug is not critical and not a priority
    on Apr 23, 2020
  5. 12 remaining items

  6. JustinStitt commented on Nov 11, 2025

    @JustinStitt

    This issue was auto-closed by virtue of a Fixes: tag in the LLVM PR but I think this should only be closed once LLVM cuts a release that includes the fix and we can verify these sorts of warnings aren't popping up anymore.

  7. JustinStitt commented on Nov 11, 2025

    @JustinStitt

    Up to you though @nathanchance

  8. added and removed
    [PATCH] BitrotPatch is outdated and needs to be refreshed or revisited
    on Nov 11, 2025
  9. nathanchance commented on Nov 11, 2025

    @nathanchance
    Member

    We historically have closed an issue whenever it is fixed in main with a FIXED LLVM label for the version we expect it to be released in, so I think we can just do that here (since there is not anything else for us to do about this problem other than continuing to work around the issue in the kernel for older versions of clang when necessary).

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

    [BUG] llvmA bug that should be fixed in upstream LLVM[FIXED][LLVM] 22This bug was fixed in LLVM 22[WORKAROUND] AppliedThis bug has an applied workaroundknown differenceknown difference between GNU and LLVM; maybe unresolvablelow priorityThis bug is not critical and not a priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions