[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 21 15:25:02 PDT 2023


nickdesaulniers added a comment.

In D76096#4524003 <https://reviews.llvm.org/D76096#4524003>, @efriedma wrote:

> The ones most likely to be a concern are InitListExpr and StringLiteral.

Here's a reduced instance from the Linux kernel:

  struct timespec64 {
    long tv_sec;
    long tv_nsec;
  } do_utime_mtime;
  void __attribute__do_utime() { struct timespec64 t[] = {{}, do_utime_mtime}; }

Trace: https://paste.debian.net/1286590/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76096



More information about the cfe-commits mailing list