[PATCH] D67414: [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

Shoaib Meenai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 12 18:20:03 PST 2020


smeenai added a comment.

In D67414#1873445 <https://reviews.llvm.org/D67414#1873445>, @efriedma wrote:

> > https://gcc.godbolt.org/z/cY9-HQ
>
> gcc's behavior for your testcase makes no sense.  We have to emit the definition of a static function: it can't be defined in any other translation unit because it's impossible to name in any other translation unit.  Note the "_ZL" prefix.  (Given the way ELF works, I guess you could get around that limitation if the function is `extern "C"`, but still...)


You're right. Perhaps we should just not warn for the combination of `static` and `gnu_inline` then? On my end I'm just planning to drop the `gnu_inline` in the internal code though, since I can't fathom a reason for wanting the combination of the two.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D67414





More information about the cfe-commits mailing list