Quuxplusone added subscribers: rjmccall, Quuxplusone.
Quuxplusone added a comment.

Re the language option: In https://reviews.llvm.org/D27163, @rsmith wrote:

> Perhaps some catch-all "I want defined behavior for things that C defines 
> even though I'm compiling in C++" flag would make sense here?

It didn't happen then, but I'd like to re-raise the idea. There's probably 
plenty of code (e.g. Apple kernel drivers, judging from @rjmccall's comments on 
https://reviews.llvm.org/D27163) that's written in the common subset of C and 
C++ but compiled as C++. It's unfortunate that that workflow keeps getting 
"broken" by aggressive diagnostics (in this case) and aggressive optimizations 
(in that case). I'd like if Clang provided a way for the user to explicitly 
opt-in and say "Some or all of this code is C compiled as C++; please respect 
that."

(IOW, it looks as if this patch proposes to fix the noisy diagnostic for every 
language //except for// C-sometimes-compiled-as-C++, and as a sometime writer 
of C-sometimes-compiled-as-C++ myself, that irks me. Apologies if I've 
misconstrued the patch.)


https://reviews.llvm.org/D28148



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

Reply via email to