On Friday, October 19, 2018 10:17:29 AM PDT Matt Turner wrote: > On Thu, Oct 18, 2018 at 6:06 PM Kenneth Graunke <kenn...@whitecape.org> wrote: > > > > This warning detects non-void functions with a missing return statement, > > return statements with a value in void functions, and functions with an > > bogus return type that ends up defaulting to int. It's already enabled > > by default with -Wall. Generally, these are fairly serious bugs in the > > code, which developers would like to notice and fix immediately. This > > patch promotes it from a warning to an error, to help developers catch > > such mistakes early. > > > > I would not expect this warning to change much based on the compiler > > version, so hopefully it won't become a problem for packagers/builders. > > > > See the GCC documentation or 'man gcc' for more details: > > https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Warning-Options.html#index-Wreturn-type > > I'm curious what prompted this. Did we actually have a bug that would > have been caught by this? >
Never committed, but I broke some things in iris a long while back. I think I had botched includes which made some type not exist, which made it default to an int type, which wasn't at all what I wanted. I think it may have been something that led to GPU hangs or something awful. Spent a while debugging it, then asked "why doesn't the compiler just disallow this?". At the time I still had a fair amount of warnings about unused things I hadn't finished hooking up, so I missed the warning. Hmm, but now I guess you have to patch this out for Gentoo by policy? I'm adamantly against -Werror, but I figured this very narrow subset could be useful while not breaking unless there are real bugs. If people really don't want it, feel free to revert. --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev