This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C constant expressions proposals
Mark Mitchell wrote:
I disagree, but we've had that debate before, so it seems boring to have
it again. The bottom line is that optimizer people always think that
the middle-end should do this kind of thing; people who do other things
don't necessarily agree.
I am confused. Full detection of undefined variables requires full
flow analysis and solution of data flow equations. Are you really
saying the front end should do this.
Indeed the front end can do some of this (GNAT does a quite reasonable
job, based on a linear flow approximation), but the back end optimizer
can still discover cases that GNAT misses.
Another example are incorrect asm statements: the front end shouldn't be
in the business of validating them.
Perhaps
I am really quite amazed by the "perhaps" here, since it seems obvious
to me that it is unreasonable to expect to have a full parser for all
possible assemblers in the back end (let alone in the front end).