Opened 8 years ago
Closed 8 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 by , 8 years ago
comment:2 by , 8 years ago
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 );
}
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.