[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] const_wanted
From: |
grischka |
Subject: |
Re: [Tinycc-devel] const_wanted |
Date: |
Sun, 31 Jul 2011 18:48:04 +0200 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
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 experimental upload. I was thinking about doing it each time
cur_text_section is non NULL but it requires a static variable to store the
previous value of const_wanted accross functions.
If you want to fix a bug then adding tests on 'cur_text_section'
is wrong because we don't have any such test anywhere currently.
Which means that the code relies on the fact that it is always
set when needed.
If however you want to clean up the relationship between
cur_text_section
and
const_wanted
and maybe
nocode_wanted
which is probably possible, then your patch should remove more
code than that it adds. Otherwise it would not be a cleanup.
int foo_array[fn() ? 2 : 42];
This should give an error such as with gcc:
test.c:10: error: variable-size type declared outside of any function
Would the patch attached be satisfying or you prefer a better test for the
global level?
I'd prefer one that actually works. And then one that doesn't
mess with 'cur_text_section'. ;)
I'd suggest you start here
http://repo.or.cz/w/tinycc.git/commitdiff/9b52e16a50
or otherwise wait for Joe to do it. Joe?
Btw, what about the multi-arch configuration. Do you still plan
to move some of the logic out from tcc into configure?
--- grischka
- [Tinycc-devel] const_wanted, grischka, 2011/07/31
- Re: [Tinycc-devel] const_wanted, Thomas Preud'homme, 2011/07/31
- Re: [Tinycc-devel] const_wanted, grischka, 2011/07/31
- Re: [Tinycc-devel] const_wanted, Thomas Preud'homme, 2011/07/31
- Re: [Tinycc-devel] const_wanted, grischka, 2011/07/31
- Re: [Tinycc-devel] const_wanted, Thomas Preud'homme, 2011/07/31
- Re: [Tinycc-devel] const_wanted,
grischka <=
- Re: [Tinycc-devel] const_wanted, Thomas Preud'homme, 2011/07/31
- Re: [Tinycc-devel] const_wanted, grischka, 2011/07/31
- Re: [Tinycc-devel] const_wanted, Michael B. Smith, 2011/07/31