VLA/VM [*] bug fixes for C
Gabriel Dos Reis
gdr@integrable-solutions.net
Wed May 10 20:01:00 GMT 2006
"Joseph S. Myers" <joseph@codesourcery.com> writes:
| On Wed, 10 May 2006, Andreas Schwab wrote:
|
| > Mike Stump <mrs@apple.com> writes:
| >
| > > Speaking of typeof, should typeof (vla) follow the same rules as for
| > > sizeof (vla)? vla, evaluate, otherwise, no eval.
| >
| > How would typeof be able to eval anything?
|
| If you have "typeof ((int (*)[f()])g())", clearly you need to evaluate the
| call f() in order to know the type being referred to. As such, I think
| the logical conclusion is to evaluate the argument of typeof whenever of
| VM type (and so evaluate the call g() as well).
|
| With VLAs, type names (in declarations, sizeof, typeof, casts and compound
| literals) can need to be executed for their side-effects.
well, people may just switch to DML :-)
C used to be simple.
-- Gaby
More information about the Gcc
mailing list