llvm/llvm-project

Missing changes for WG14 N3622

Open

#166,623 建立於 2025年11月5日

在 GitHub 查看
 (6 留言) (1 反應) (0 負責人)C++ (10,782 fork)batch import
c2yclang:frontendgood first issue

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

8e60adcaafbd5b6859f54879496e017dd218e541 implemented part of the paper, but missed "shall not contain a definition of a modifiable object with static or thread storage duration" from the removed text. e.g., we still diagnose this:

inline void f(void) {
  static int x; // warning: on-constant static local variable in inline function may be different in different files
}

https://godbolt.org/z/PhK6YvYnP

This should be accepted in C2y mode and claimed as an extension in earlier language modes.

貢獻者指南