From: Alan C. <al...@lx...> - 2014-09-25 19:13:36
|
Is there a "proper" way to put some functions in a file into a different section for linking Right now I'm doing /* Force the rest of this code into common */ void dummy(void) __naked { __asm .area _COMMONMEM __endasm; } which while bletcherous does seem to work, at least for my use case. I've also got another ugly I'm having to use because sdcc errors #ifdef SOMETHING <entire code> #endif which produces an error that ANSI C doesn't permit an empty file. While that is correct I see nothing in the standard that says "after preprocessing" and would submit that is a compiler bug ? Alan |