Page 3 of 3

Re:single function with multiple names

Posted: Sun Aug 22, 2004 2:16 am
by Candy
B1FF wrote: >Is it possible in C/C++ to create a function with more than one function name?

Code: Select all

typedef unsigned pid_t;
int kill(pid_t pid) { return pid; }
int killp(pid_t pid) __attribute__((weak, alias("kill")));
even though it's GCC++, thanks man! now back to coding (and cleaning, and laundry... living on your own isn't just fun)