[PATCH] D157435: [Sema] Do not emit -Wmissing-variable-declarations for register variables

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 13:25:08 PDT 2023


nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.

Thanks for the patch; I think it's better not to warn rather than expect users to add an
`unsigned long currest_stack_pointer;` declaration before the definition for `register` storage variables.

Maybe worth add a link to the GCC bug report in the commit message, too?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110947



================
Comment at: clang/test/Sema/warn-missing-variable-declarations-register.c:2
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -Wmissing-variable-declarations -fsyntax-only -verify %s
+// REQUIRES: x86-registered-target
+// expected-no-diagnostics
----------------
@aaron.ballman do we need this REQUIRES clause?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157435/new/

https://reviews.llvm.org/D157435



More information about the cfe-commits mailing list