mstorsjo added a comment.

In D67414#1668579 <https://reviews.llvm.org/D67414#1668579>, @rsmith wrote:

> OK. If this is causing compatibility pain in practice, following GCC here 
> seems reasonable. We should at least produce a warning on `gnu_inline` 
> without `extern` in C++ mode, though.


Yes, a warning probably is good. As these things tend to be in headers, it'd be 
quite spammy, but it would alert the user that while the construct does work in 
current (future) clang versions, it doesn't in older ones, allowing users to 
steer clear of it.

Is there any existing DiagGroup which would be a good fit for such a warning, 
and what would be good wording for it?

"gnu_inline without extern in C++ treated as if externally available" (which is 
exactly what the GCC docs for the attribute says, which isn't too 
understandable unless you know the history)

"gnu_inline without extern in C++ changed behaviour in Clang 10" (doesn't say 
much about what changed and how)


Repository:
  rC Clang

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

https://reviews.llvm.org/D67414



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to