[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] tiny bit of lint
From: |
Christian Jullien |
Subject: |
Re: [Tinycc-devel] tiny bit of lint |
Date: |
Tue, 9 May 2017 10:11:01 +0200 |
Hi Larry,
I see your efforts to make tcc more happy when compiled with clang.
For printf("<- %s (%d symbol%s)\n", buf, sym_count, "s"[sym_count < 2]);
It's even better if you use:
printf("<- %s (%d symbol%s)\n", buf, sym_count, ((sym_count > 1) ? "s" :
""));
-----Original Message-----
From: Tinycc-devel [mailto:address@hidden
On Behalf Of Larry Doolittle
Sent: lundi 8 mai 2017 18:48
To: address@hidden
Subject: Re: [Tinycc-devel] tiny bit of lint
grischka -
On Mon, May 08, 2017 at 07:27:08PM +0200, grischka wrote:
> Larry Doolittle wrote:
> >I committed (to mob) one patch that should count as progress.
> > Remove some unused-parameter lint
>
> In my book that counts as visual clutter with no practical benefit.
> The opposite of "tinycc avoids the unnecessary". Suggesting
> particular care that feels alien in contrast to what the code really cares
about.
I respect that point of view. Yes, the code is a bit more cluttered.
In this case I added 11 lines of cruft to 9841 existing lines of code.
Also note that this is source-only cruft, with no effect on the resulting
binary.
The potential upside, that I do value, is that (with a bit more work like
this) "we" get to turn on -Wextra for general development. That _should_
lead to _real_ flaws getting caught earlier in the development cycle.
If unused parameters in general are considered OK in this code base, CFLAGS
could be set to -Wextra -Wno-unused-argument. The trick there would be in
the configure/Makefile step, adding that flag set only on compatible
compilers.
I'll hold off doing anything more like this until and unless I hear a net
positive from the mailing list.
- Larry
_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
- [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/07
- Re: [Tinycc-devel] tiny bit of lint, Michael Matz, 2017/05/07
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/08
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/08
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/08
- Re: [Tinycc-devel] tiny bit of lint,
Christian Jullien <=
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, grischka, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Christian Jullien, 2017/05/09
- Re: [Tinycc-devel] tiny bit of lint, Larry Doolittle, 2017/05/09