[PATCH] D78952: [LangRef] Describe linkage types, allocation size of declarations for global variables

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 10:44:44 PDT 2020


efriedma added a comment.

> Question regarding alignment: I would expect that a variable declaration with lower alignment than the definition it refers to should be fine. For example, when declaring an extern global variable of a forward-declared struct type in C, clang will use an opaque type with alignment 1 for the declaration.

Sure, the alignment specified on a declaration can be lower than the alignment on the definition.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78952





More information about the llvm-commits mailing list