[Tinycc-devel] const_wanted

2011-07-31 Thread grischka
Thomas Preud'homme wrote in http://repo.or.cz/w/tinycc.git/commitdiff/b2f5ee9b2d Force const. expr. in expr_cond outside function Since no code should be generated outside a function, force expr_cond to only consider constant expression when outside a function since the generic code can generat

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread Thomas Preud'homme
Le dimanche 31 juillet 2011 15:58:25, grischka a écrit : > Thomas Preud'homme wrote in > http://repo.or.cz/w/tinycc.git/commitdiff/b2f5ee9b2d > > > Force const. expr. in expr_cond outside function > > > > Since no code should be generated outside a function, force expr_cond to > > only consider c

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread grischka
Thomas Preud'homme wrote: Can you show an example where this happens, that is that const_wanted is false and cur_text_section is NULL at the same time in cond_expr()? Sure. It's a side effect of the VLA array patches. On Hurd, there is a header with something like: #define FOO_COUNT (

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread Thomas Preud'homme
Le dimanche 31 juillet 2011 16:27:57, grischka a écrit : > Thomas Preud'homme wrote: > >> Can you show an example where this happens, that is that > >> > >> const_wanted is false > >> > >> and > >> > >> cur_text_section is NULL > >> > >> at the same time in cond_expr()? > > > > Sure. I

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread grischka
Thomas Preud'homme wrote: Mmmmh good point, I should have tried with mob. I can't reproduce it neither. So I guess master is not as close to mob as I thought. Plus running the const_wanted branch without const_wanted being actually set doesn't look like a good idea. It could still generate cod

Re: [Tinycc-devel] tcc bug?

2011-07-31 Thread grischka
yan wei wrote: Hi, everyone, I use easymesh_1_4.c to test tcc 0.9.25 under win7. It compiles successfully but "easymesh_1_4.exe example.d" can not work. This test works ok by using Visual C++ 6.0. Does anyone know whether this is an bug of tcc? Can you tell us what line in the sou

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread Thomas Preud'homme
Le dimanche 31 juillet 2011 17:23:28, grischka a écrit : > Thomas Preud'homme wrote: > > Mmmmh good point, I should have tried with mob. I can't reproduce it > > neither. So I guess master is not as close to mob as I thought. > > Plus running the const_wanted branch without const_wanted being > ac

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread grischka
Thomas Preud'homme wrote: Plus running the const_wanted branch without const_wanted being actually set doesn't look like a good idea. It could still generate code in the gen_cast() or gexpr() calls below. Thanks, I'll set (and unset at the end of the function) const_wanted in the next experim

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread Thomas Preud'homme
Le dimanche 31 juillet 2011 18:48:04, grischka a écrit : > Thomas Preud'homme wrote: > >> Plus running the const_wanted branch without const_wanted being > >> actually set doesn't look like a good idea. It could still > >> generate code in the gen_cast() or gexpr() calls below. > > > > Thanks, I'

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread grischka
Thomas Preud'homme wrote: I knew you would answer something like this. That's why I didn't apply the patch straight forward. You did not apply the patch because you knew it doesn't work? ;) I've just found this commit when searching for what made the bug disappear. The "else if" should not ha

Re: [Tinycc-devel] const_wanted

2011-07-31 Thread Michael B. Smith
Are those semicolon strings on Windows? -Original Message- From: tinycc-devel-bounces+michael=theessentialexchange@nongnu.org [mailto:tinycc-devel-bounces+michael=theessentialexchange@nongnu.org] On Behalf Of grischka Sent: Sunday, July 31, 2011 7:20 PM To: Thomas Preud'homme Cc: