rnk added inline comments.

================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7872-7874
-def warn_ret_addr_label : Warning<
-  "returning address of label, which is local">,
-  InGroup<ReturnStackAddress>;
----------------
lebedev.ri wrote:
> Why completely drop the diagnostic just because it is undesired in linux code?
> Why not just add an `-Wreturn-stack-address` diag option instead, and disable 
> it if undesired?
There's just no use for it. There is no actual lifetime issue here. Just 
because a label goes out of scope doesn't invalidate it for use with some 
future execution of the scope. Labels aren't variables, we should never have 
had this check in the first place, IMO.


https://reviews.llvm.org/D50805



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

Reply via email to