NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Different CFLAGS for different files? ("blah may be used uninitialized" errors with -Os)



Magnus Eriksson <magetoo%fastmail.fm@localhost> wrote:

> I seem to getting a lot of these "[something] may be used uninitialized
> in this function" warnings while building 6.0.  Apparently I'm not the
> only one - and apparently it's harmless, and is caused by using -Os:
> http://mail-index.netbsd.org/current-users/2011/10/31/msg018124.html
> 
> I don't suppose anyone has thought of a way of working around this
> without changing compiler flags for the whole build?  Right now I'm just
> re-issuing the failed command manually with different compiler flags and
> then restarting. (build.sh -o -u)
> 
> Not a huge deal, but it's annoying to have to babysit the process..

Well, there is per-file options support in makefiles, e.g.

COPTS.file.c += -some -flags

but sprinkling them to work around gcc bugs would be a waste of time.
Why don't just build with -Wno-uninitialized?

-uwe



Home | Main Index | Thread Index | Old Index