Calling functions in any of the following places causes a crash: - Template instantiation (as part of the argument()) - Range specification (of integers) - Array declaration (when used in dimension) Calling a function in any of these places is valid as long as the function is side effect free and does not depend on any state variables.
A fixed has been checked into CVS. One problem remains: int f() { return 2; } int a[f()] = { 1, 2 }; is not allowed by the parser. This is a different problem, though: The parser is unable to evaluate f(), thus it cannot check that the initialiser has the correct length. Without the initialiser everything is fine.