[Toybox] Warning: gcc can't tell this is never used uninitialized, but llvm can.

enh enh at google.com
Tue Oct 30 11:17:37 PDT 2018


On Tue, Oct 30, 2018 at 11:07 AM Rob Landley <rob at landley.net> wrote:
>
> On 10/30/18 12:35 PM, Josh Gao wrote:
> > On Tue, Oct 30, 2018 at 10:05 AM Rob Landley <rob at landley.net
> >
> > > (assuming current llvm doesn't barf on the extra flag)
> >
> > I have bad news for you:
> > $ ./prebuilts/clang/host/linux-x86/clang-r339409b/bin/clang -Wmaybe-initialized
> > -x c++ -
> > warning: unknown warning option '-Wmaybe-initialized'; did you mean
> > '-Wuninitialized'? [-Wunknown-warning-option]
>
> Which is why it was still on the todo list. Sigh. (Possibly llvm should
> greenlight -Wno-* en masse if you're disabling something it doesn't _have_?
> Dunno, not my area...)

i think the problem is: how would clang know whether it's an option
for a different compiler versus a simple typo?

> The downside of leaving cryptic notes-to-self late at night that you don't see
> again for months. And I said "current" because the last llvm I checked (2016?)
> didn't have it. I remembered "missing" but forgot what specifically was missing
> from where. I put it back on this release's todo list because somebody dinged me
> on IRC about the x = x assignments on twitter being nonstandard. I want to say
> "Rich Felker" since he tends to be the nitpickiest standards rules lawyer I hang
> out with online, but it could be anybody at this point...
>
> Rob
>
> P.S. if you -x c++ toybox won't compile anyway. (C is not C++.)
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list