Re: [Tinycc-devel] [PATCH] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
On Mon, Nov 5, 2012 at 12:33 AM, Hitoshi Mitake wrote: > Hi tcc folks, nice to meet you. > > I found a trivial bug of tcc. Current tcc permits comparison of > structs and comparison between struct and other typed values. This > patch can fix the bug. > > I'm new to tcc. Sorry if this patch contain

[Tinycc-devel] [PATCH v2] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
I found a trivial bug of tcc. Current tcc permits comparison of structs and comparison between struct and other typed values. This patch can fix the bug. I'm new to tcc. Sorry if this patch contains wrong part. I'd like to hear your comments. v2: fix on the bug of mod branch Thanks, --- tccgen.

Re: [Tinycc-devel] [PATCH v2] forbid invalid comparison of struct

2012-11-05 Thread arnold
Hitoshi Mitake wrote: > +} else if (bt1 == VT_STRUCT || bt1 == VT_STRUCT) { ^^^ ^^^ Isn't this testing the same condition twice? :-) Arnold ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.non

Re: [Tinycc-devel] [PATCH v2] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
On Mon, Nov 5, 2012 at 9:56 PM, wrote: > Hitoshi Mitake wrote: > >> +} else if (bt1 == VT_STRUCT || bt1 == VT_STRUCT) { > ^^^ ^^^ > > Isn't this testing the same condition twice? > > :-) Oops, very sorry :( I'll send a fixed version later. Thanks for your

[Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
Hi tcc folks. I found a trivial bug of tcc. Current tcc permits comparison of structs and comparison between struct and other typed values. This patch can fix the bug. I'm new to tcc. Sorry if this patch contains wrong part. I'd like to hear your comments. v2: fix on the bug of mod branch v3: fi

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Thomas Preud'homme
Le lundi 5 novembre 2012 14:01:20, Hitoshi Mitake a écrit : > Hi tcc folks. > > I found a trivial bug of tcc. Current tcc permits comparison of > structs and comparison between struct and other typed values. This > patch can fix the bug. > > I'm new to tcc. Sorry if this patch contains wrong part

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
On Mon, Nov 5, 2012 at 10:13 PM, Thomas Preud'homme wrote: > Le lundi 5 novembre 2012 14:01:20, Hitoshi Mitake a écrit : >> Hi tcc folks. >> >> I found a trivial bug of tcc. Current tcc permits comparison of >> structs and comparison between struct and other typed values. This >> patch can fix the

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Thomas Preud'homme
Le lundi 5 novembre 2012 14:53:16, Hitoshi Mitake a écrit : > Thanks, I committed the change on the mob branch. Great. > > BTW, I've intended to implement comparison between structs > originally. And I found the bug accidentally. As I reviewed your patch and realized it's correct and I was wron

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
On Mon, Nov 5, 2012 at 11:04 PM, Thomas Preud'homme wrote: > Le lundi 5 novembre 2012 14:53:16, Hitoshi Mitake a écrit : >> Thanks, I committed the change on the mob branch. > > Great. > >> >> BTW, I've intended to implement comparison between structs >> originally. And I found the bug accidentall

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Rob
On Mon, Nov 05, 2012 at 11:19:00PM +0900, Hitoshi Mitake wrote: > On Mon, Nov 5, 2012 at 11:04 PM, Thomas Preud'homme wrote: > > Le lundi 5 novembre 2012 14:53:16, Hitoshi Mitake a écrit : > >> Of course, comparison between different typed structs or structs and > >> scalar typed values should cau

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Hitoshi Mitake
On Tue, Nov 6, 2012 at 5:28 AM, Rob wrote: > On Mon, Nov 05, 2012 at 11:19:00PM +0900, Hitoshi Mitake wrote: >> On Mon, Nov 5, 2012 at 11:04 PM, Thomas Preud'homme >> wrote: >> > Le lundi 5 novembre 2012 14:53:16, Hitoshi Mitake a écrit : >> >> Of course, comparison between different typed struc

Re: [Tinycc-devel] [PATCH v3] forbid invalid comparison of struct

2012-11-05 Thread Thomas Preud'homme
Le lundi 5 novembre 2012 23:21:06, Hitoshi Mitake a écrit : > > Thanks for your interest :) > I'm hosting my tcc here, and I'll push the change to this branch: > https://github.com/mitake/tinycc/tree/struct-cmp > I've not implemented the feature yet, but my work in progress will appear > here. Yo

Re: [Tinycc-devel] BUILDS AND SOURCE CODE

2012-11-05 Thread Alexandre Teles
In Windows I only need to have mingw installed. In mingw prompt I do a cd to tinycc source directory and type: ./configure make make install The tcc dir will be placed in "%programfiles%/tcc" fully functional. 2012/11/4 Milutin Jovanović > > I am on Mac (and Linux is the same), so a simple >