Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread grischka
Larry Doolittle wrote: Proof of concept, where dummy.c is something simple and correct like int dummy(void) { return 0; } CFLAGS="-Wall -g -O2" cc=clang W_OPTIONS="extra declaration-after-statement undef strict-prototypes write-strings lskdjfsldfkj bogus no-pointer-sign no-sign-compare

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Larry Doolittle
grischka - On Tue, May 09, 2017 at 07:33:28PM +0200, grischka wrote: > Yes, the configure warning magic doesn't work with clang. And > hence my question was: > Can you fix this? > Means: recognize if $CC is clang and implement some method to > disable its warnings in configure. Can you do

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
Of grischka Sent: mardi 9 mai 2017 19:33 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] tiny bit of lint Larry Doolittle wrote: > grischka - > > On Tue, May 09, 2017 at 05:44:28PM +0200, grischka wrote: >> If people are going to use clang more likely, can't you add something &g

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread grischka
Larry Doolittle wrote: grischka - On Tue, May 09, 2017 at 05:44:28PM +0200, grischka wrote: If people are going to use clang more likely, can't you add something to configure for clang to turn off some silly warnings? That would be USEFUL, for example ;) The clang flag to turn off this

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Larry Doolittle
grischka - On Tue, May 09, 2017 at 05:44:28PM +0200, grischka wrote: > If people are going to use clang more likely, can't you add something > to configure for clang to turn off some silly warnings? > That would be USEFUL, for example ;) The clang flag to turn off this warning is

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
it's up to you! -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of grischka Sent: mardi 9 mai 2017 17:44 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] tiny bit of lint Larry Doolittle wrote: > Friends - > >

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread grischka
Larry Doolittle wrote: Friends - On Tue, May 09, 2017 at 11:49:23AM +0200, Christian Jullien wrote: Arf! You're right. That why I never fix warning in a code which is not mine. My fix proposal is definitively better. Sorry, everyone, testing should have caught my original mistake. I

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
ot;, buf, sym_count); Which is both faster and shorter. -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Larry Doolittle Sent: mardi 9 mai 2017 16:24 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] tiny bit of lint Friends -

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Larry Doolittle
lains about the original form. - Larry > -Original Message- > From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] > On Behalf Of grischka > Sent: mardi 9 mai 2017 10:26 > To: tinycc-devel@nongnu.org > Subject: Re: [Tinycc-devel] tiny bit of lint >

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
@nongnu.org Subject: Re: [Tinycc-devel] tiny bit of lint Larry Doolittle wrote: @@ -965,7 +965,7 @@ static void pe_build_exports(struct pe_info *pe) } else { fprintf(op, "LIBRARY %s\n\nEXPORTS\n", dllname); if (pe->s1->verbose) -printf("<-

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread grischka
Larry Doolittle wrote: @@ -965,7 +965,7 @@ static void pe_build_exports(struct pe_info *pe) } else { fprintf(op, "LIBRARY %s\n\nEXPORTS\n", dllname); if (pe->s1->verbose) -printf("<- %s (%d symbol%s)\n", buf, sym_count, "s" + (sym_count < 2)); +

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
uot;s" : "")); -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Larry Doolittle Sent: lundi 8 mai 2017 18:48 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] tiny bit of lint grischka - On Mon, May 08, 201

Re: [Tinycc-devel] tiny bit of lint

2017-05-09 Thread Christian Jullien
s is assigned to char [2] (no room for null terminator): "`\n" -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Michael Matz Sent: lundi 8 mai 2017 20:43 To: tinycc-devel@nongnu.org Subject: Re: [

Re: [Tinycc-devel] tiny bit of lint

2017-05-08 Thread Michael Matz
Hi, On Mon, 8 May 2017, Christian Jullien wrote: > tcc.h: (in function is_space) > tcc.h:1244:12: Operands of == have incompatible types (int, char): ch == ' ' > A character constant is used as an int. Use +charintliteral to allow > character constants to be used as ints. (This is safe

Re: [Tinycc-devel] tiny bit of lint

2017-05-08 Thread Larry Doolittle
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

Re: [Tinycc-devel] tiny bit of lint

2017-05-08 Thread grischka
Larry Doolittle wrote: I committed (to mob) one patch that should count as progress. Commit message: Remove some unused-parameter lint Mark TCCState parameter as unused in tcc_undefine_symbol(), tcc_add_symbol(), tcc_print_stats(), asm_get_local_label_name(), use_section1(),

Re: [Tinycc-devel] tiny bit of lint

2017-05-08 Thread Larry Doolittle
Michael - On Mon, May 08, 2017 at 05:40:38AM +0200, Michael Matz wrote: > On Sun, 7 May 2017, Larry Doolittle wrote: > >Using gcc's -Wextra, I found 17 "unused parameter", > If the silencing really should happen (e.g. by void casting, as you > say) I have no big opinion on. I'd like to look at

Re: [Tinycc-devel] tiny bit of lint

2017-05-08 Thread Christian Jullien
300:30: Left operand of << may be negative (int): bas << 5 -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Christian Jullien Sent: lundi 8 mai 2017 07:48 To: tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] tiny

Re: [Tinycc-devel] tiny bit of lint

2017-05-07 Thread Christian Jullien
n't own .. unless I'm ready to stop using them :o)) -Original Message- From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange...@nongnu.org] On Behalf Of Larry Doolittle Sent: lundi 8 mai 2017 05:13 To: tinycc-devel@nongnu.org Subject: [Tinycc-devel] tiny bit of lint Esteemed tin

Re: [Tinycc-devel] tiny bit of lint

2017-05-07 Thread Michael Matz
Hi, On Sun, 7 May 2017, Larry Doolittle wrote: Using gcc's -Wextra, I found 17 "unused parameter", which could be addressed by bloating the source code a bit (casting to void), and with no consequence on the binary. If anyone else thought that would be an improvement, I'd be happy to write