Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job
- From
Jeff King <peff@peff.net>
- Date
- Mar 17, 2018, 16:12 UTC
- Message-ID
- <20180317161208.GA25113@sigill.intra.peff.net>
- In-Reply-To
- <20180317160832.GB15772@sigill.intra.peff.net>
On Sat, Mar 17, 2018 at 12:08:32PM -0400, Jeff King wrote:
Show 11 quoted lines
> +case "$($CC --version 2>&1)" in > +gcc*) > + print_flags gcc > + ;; > +clang*) > + print_flags clang > + ;; > +*) > + : unknown compiler family > + ;; > +esac
By the way, one annoying thing is that running "cc --version" when "cc" is actually "gcc" will print something like:
cc (Debian 7.3.0-11) 7.3.0
even though it supports all of the gcc knobs. This means that:
make DEVELOPER=1
without further config won't get these knobs, because we (rightly) default CC=cc.
Probably this detection could be a bit more clever, like:
cc*Free Software Foundation") print_flags gcc
or something. I don't have any non-gcc/clang compilers to test with, so I'm not sure what they even print for "--version" (if anything).
-Peff