On Tue, 2 Apr 2013, Jakub Jelinek wrote: > The following patch folds it there immediately too. Bootstrapped/regtested > on x86_64-linux and i686-linux, ok for trunk?
OK. > BTW, in the PR I've also mentioned what has been reported to the Red Hat > bugzilla about __builtin_constant_p in array bounds of static (or extern) > arrays in block contexts. Those can't be VLAs, so we want to know the > constant bound, but if __builtin_constant_p is used there, we error on it > (while at file scope it compiles fine, because if cfun is NULL, we fold > __builtin_constant_p immediately). Any suggestions how to fix that? It's not going to be as simple as using information about the declaration specifiers when parsing array declarators, because a static pointer to VLA is valid, so it would also be necessary to distinguish whether the declaration in question is actually going to be of a static array itself. -- Joseph S. Myers jos...@codesourcery.com