This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 184

Summary: Function calls in declarations cause crash
Product: UPPAAL Reporter: Gerd Behrmann <behrmann>
Component: EngineAssignee: Gerd Behrmann <behrmann>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.5.9   
Hardware: All   
OS: All   
Architecture:

Description Gerd Behrmann 2005-08-19 22:06:20 CEST
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.
Comment 1 Gerd Behrmann 2005-08-21 15:52:30 CEST
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.