From: UNIX s. B. W. <bw...@ma...> - 2003-04-04 17:11:42
|
On Fri, 4 Apr 2003, Steve Tell wrote: > On Sun, 30 Mar 2003, Scott Dattalo wrote: > > > I applied your patch and verified that the PIC regression tests still > > work. > > Thanks! > > I've just submitted another one, this time through sourceforge (#715085). > This patch+regression gets a lot of function-pointers working: > void (*pfunc)(); > void call0(void) { } > ... > pfunc = call0; > (pfunc)(); I have never seen syntax like that to call through a function pointer. Here are the two forms I have seen.... pfunc(); // Compiler figures out what to do. (*pfunc)(); // Explicit about the ptr deref. If there is a regression test, please make sure you include these two other forms, please. kind regards, brianW > > Or rather, it would except that my regression trips over some other bugs, > one in the frontend that I logged (715076) and another PIC one that I > couldn't disentangle it from. The latter looks like one I whined about > once before: extra bogus declarations in data-memory space in the cblock > and EQU output. The above fragment produces somthing like "_call0 EQU > 0x022", _call0 and _call_1 in the cblock, as well as the code label for > the _call0 function. > > Maybe I'll try looking at this again - perhaps now that I've got a passing > acquaintance with gen.c the register allocation will start making sense. > > regards, > Steve > > > > -- > Steve Tell te...@te... > --------------------------------------------------------------------- brian witt Railroads, computers, sailboats, etc. bw...@va... |