Opened 7 years ago
Closed 7 years ago
#24 closed enhancement (fixed)
Non-compatible safety conversion (like C++), prevent void * to T *
Reported by: | pabuhr | Owned by: | |
---|---|---|---|
Priority: | major | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
forall( otype T ) T * realloc( T *ptr, size_t n ) { return (T *)(void *)realloc( ptr, sizeof(T) ); } int fred() { int *i; double *d; // need to change CFA so that T *p = void *p disallowed i = realloc( d, 2 ); }
Change History (2)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
Owner: | set to Rob Schluntz <rschlunt@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In cdbfab0:
Note: See
TracTickets for help on using
tickets.
I think this is one for the new resolver...
...of course, I haven't added generic/pointer types to the prototype yet.