Opened 7 years ago
Closed 7 years ago
#35 closed defect (fixed)
Function pointer casts are broken
Reported by: | Thierry Delisle | Owned by: | |
---|---|---|---|
Priority: | blocker | Component: | cfa-cc |
Version: | 1.0 | Keywords: | |
Cc: |
Description
I need this to work for external scheduling :
extern void save( void (*func)() ); void foo( int a ) { save( &foo ); }
Change History (4)
comment:1 Changed 7 years ago by
comment:2 Changed 7 years ago by
This would be fine for me but it also doesn't work :
typedef void (*generic_func_t)(); extern void save( generic_func_t func ); void foo( int a ) { save( (generic_func_t)foo ); }
comment:4 Changed 7 years ago by
Owner: | set to Rob Schluntz <rschlunt@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In ae4038d:
Note: See
TracTickets for help on using
tickets.
What do we actually want there? This does not work in C++, and since we're aiming for stronger types like C++, I don't think we can make this work without an explicit cast.