On 17.02.2015 06:31, Kustaa Nyholm wrote: > On 17/02/2015 06:54, "Kustaa Nyholm" <kustaa.nyh...@planmeca.com> wrote: >> >> Ok, gpasm choked (will investigate that later) >> >> + gpasm -DSTACK_MODEL_SMALL -D__STACK_MODEL_SMALL -o ../obj/testc2asm.o -c >> ../obj/testc2asm.asm returned errorcode 256 > > Hmm some quick notes. > > Even a short function like > > inline int foobar() { > } > > Causes error 256. > > > Hand assembling the code produces different error: > > ../obj/testc2asm.asm:21:Error[113] Symbol not previously defined: > "_foobar" > > > editing the asm to remove the 'global _foobar' and hand assembling > works. Ok, so the compiler is not emitting any code ... right cause > it is inline ... hmm ... I'm not actually using the foobar() in the code > lets see if calling the inlined function makes a difference..nope. > Remove the inline and now it compiles. > > So what is the magic word that makes inline work? >
Looks like inline is broken on pic16. Please file a bug report. inline works fine on the other ports (didn't try pic14, but typically pic14 is even more broken than pic16), and it is tested in the nighly regression tests (which are not done for the pic ports). Philipp
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user