[cfe-dev] [RFC] automatic variable initialization

Richard Smith via cfe-dev cfe-dev at lists.llvm.org
Mon Dec 3 17:30:07 PST 2018

On Thu, 29 Nov 2018 at 07:25, via cfe-dev <cfe-dev at lists.llvm.org> wrote:

> > Suggested compromise technique to at least get an initial set of numbers:
> >
> > 1) Require a special, long, ugly flag name.
> > 2) Make it a CC1 flag, requiring -Xclang ... to use.
> > 3) Emit a warning by default (that cannot be suppressed with a -Wno-...
> > flag) when this flag is enabled.
> And immune to -Werror I think?

We generally use remarks for "diagnostic that cannot be promoted to an
error" cases. Would that make sense here?

> > 4) Commit to never including this flag in any upstream release. Either we
> > remove it before the next release branches or we revert it on the branch.

Thank you Chandler, I think this is a very reasonable plan.

Points 3 and 4 would significantly reduce my desire for points 1 and 2 :)
Just an (on-by-default with no -R flag)

remark: flag -fzero-all-uninitialized-variables is for performance
measurements only and will not be included in any Clang release

(and actually carrying through on that) would be sufficient to address all
of my concerns.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181203/4d3a21eb/attachment.html>

More information about the cfe-dev mailing list