| 5 | | monitor Gortn {}; |
| 6 | | [void] mem3( Gortn & mutex gortn, [int, int] m ) {} |
| | 3 | The following code : {{{ |
| | 4 | typedef void (*fptr_t)(); |
| | 5 | typedef * [void] ( [int, int] m ) foo_t; |
| | 6 | |
| | 7 | struct Test{}; |
| | 8 | void ?{}(Test & this, int, fptr_t func); |
| | 9 | |
| | 10 | [void] foo([int, int] m ) { |
| | 11 | Test test = {2, (fptr_t)(foo_t) foo}; |
| | 12 | } |
| 14 | | thread Gortn {}; |
| 15 | | [void] mem3( Gortn & mutex gortn, [int, int] m ) {} |
| 16 | | |
| 17 | | void main( Gortn & gortn ) { |
| 18 | | waitfor( mem3, gortn ); |
| 19 | | } |
| 20 | | }}} |
| 21 | | {{{ |
| 22 | | cfa test1.c |
| 23 | | CFA Version 1.0.0 (debug) |
| 24 | | error: Managed object's initializer is too deep __guard: instance of struct monitor_guard_t with body 1 with initializer (maybe constructed) |
| 25 | | Compound initializer: |
| 26 | | Simple Initializer: Variable Expression: __monitors: array of pointer to instance of struct monitor_desc with body 1 with dimension of constant expression (1 1: unsigned long int) |
| 27 | | ... with environment: |
| 28 | | Types: |
| 29 | | Non-types: |
| 30 | | |
| 31 | | Simple Initializer: constant expression (1 1: unsigned long int) |
| 32 | | Simple Initializer: Cast of: |
| 33 | | Variable Expression: mem3: function |
| 34 | | ... with parameters |
| 35 | | gortn: mutex reference to instance of struct Gortn with body 1 |
| 36 | | m: tuple of types |
| 37 | | signed int |
| 38 | | signed int |
| 39 | | |
| 40 | | ... returning nothing |
| | 29 | ... returning nothing |