Changes between Version 1 and Version 4 of Ticket #95


Ignore:
Timestamp:
Jan 30, 2019, 10:58:37 AM (5 years ago)
Author:
Thierry Delisle
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #95

    • Property Owner Thierry Delisle deleted
  • Ticket #95 – Description

    v1 v4  
    99}}}
    1010
     11
    1112Produces the following error:
    1213
     
    1617test.c:92:1 error: Ambiguous function in call to waitfor
    1718}}}
     19
     20If mangling is removed for {{{mutex}}} then the following code encounters widening problems:
     21{{{
     22//----------
     23struct monitor_desc {};
     24
     25struct monitor_guard_t {};
     26void ?{}( monitor_guard_t & this, monitor_desc ** m, int count, void (*func)() );
     27
     28struct monitor_dtor_guard_t {};
     29void ?{}( monitor_dtor_guard_t & this, monitor_desc ** m, void (*func)() );
     30
     31//----------
     32forall( dtype T | sized(T) | { void ^?{}( T & ); } ) void delete( T * ptr );
     33
     34//----------
     35monitor test {};
     36
     37int main() {
     38        test * t = 0;
     39        delete(t);
     40}
     41}}}
     42Note the {{{monitor_guard_t}}} and {{{monitor_dtor_guard_t}}} structs are needed because they are expected by the code handling the mutex and monitor keywords.