[PATCH] D132952: [Sema] disable -Wvla for function array parameters

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 30 14:24:55 PDT 2022


efriedma added a comment.

As a practical matter, there isn't any reason to force variably modified parameters to make a function variably modified.  The types of parameters aren't visible in the caller of a function; we only check the compatibility for calls.

Trying to treat `void (*)(int, int *)` as variably modified would have additional complications, in that clang would internally need to have two canonical types for `void (*)(int, int *)`: one variably modified, one not variably modified.

So if there's a disagreement between clang and the standard, I'd rather just try to fix the standard.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132952



More information about the cfe-commits mailing list