How to force gcc to long-call a function (on MIPS)?

PRC panruochen@gmail.com
Sun Feb 24 12:41:00 GMT 2008


1). Declaring `extern int func_entry(int) __attribute__((far))' without `-mlong-calls' is okay.
2). Declaring `extern int func_entry(int) __attribute__((long_call))' without `-mlong-calls' is not okay.
3). Declaring `extern char func_entry[]' and `typedef int (*FUNC_ENTRY)(int) __attribute__((far))', and calling it by ` ((FUNC_ENTRY)func_entry)(para) ' without `-mlong-calls' is not okay either, even if this usage is semantically equal to usage 1.

I am not sure either this is a bug of gcc or this is a misusage of __attribute__((far))/__attribute__((long_call)).



More information about the Gcc-help mailing list