I took a look at the event "construction", which is just a bunch of casts, and replaced it just as suggested in the wxWidget's manual (adding even more casts) and... voilĂ ! The value of
this is right for both calls now (good luck or fix... nobody knows).
I checked the address returned by both bunch of casts and both return the same address. It's even more confusing now because if it was the problem it should, at least, return different values.
I decided to check that 'cause I thought some evil magic there could cause it, but having the same value returned do also makes sense after all, 'cause we're playing with pointers to member functions.
At the end it could be some deep cast in wxWidget's code being generated differently by GCC 4.1, but the results of my tests just confuse me more.
For reference: sdk_events.h, line 209, from:
#define EVT_PIPEDPROCESS_TERMINATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( cbEVT_PIPEDPROCESS_TERMINATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ),
to:
#define EVT_PIPEDPROCESS_TERMINATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( cbEVT_PIPEDPROCESS_TERMINATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNotifyEventFunction) (CodeBlocksEventFunction)&fn, (wxObject *) NULL ),
Right now, the most confusing part is why that change makes it work if it seems to change absolutely nothing at all