Tool/software: TI C/C++ Compiler
Hello!
Noticed the following on both 16.9.6.TLS and 18.1.1.LTS, when compiling
extern "C" int test(int (*)(int));
int test(int (*f)(int)) { return 0; }
The result will be the decorated function "_Z4testPFiiE", not "test", as expected, and result later in a link error. Working around, passing the function in a structure will work, but makes the call syntax awkward from C:
struct test_arg { int (*f)(int); }
extern "C" int test2(struct test_arg f);
int test2(struct test_arg f) { return 0; }
This will correctly link correctly (the name is "test2")