jyknight added a comment.

In D153156#4599595 <https://reviews.llvm.org/D153156#4599595>, @rZhBoYao wrote:

> What if a programmer is really trying to call operator""b here (albeit 
> ill-formed)

Because that code is ill-formed, Clang diagnosed it with an error by default. 
Isn't that preferable to accepting it by default?

And disabling the error treats it as string-concat, because that enables users 
to remain compatible with code written assuming C++98 semantics for macros in 
string concatenation. (This support was a quite-intentionally added feature, 
not an accident of implementation!)

FWIW, GCC does the same thing, but with an on-by-default-warning that doesn't 
even default to error severity. I do think it's OK to remove support for this 
extension if spec-compliance requires it, but AFAICT, that's not the case here, 
so I think it would be preferable to preserve the previous behavior.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153156

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

Reply via email to