If identifier is not a valid function name, as could be used in normal func-
tion definitions, the compiler will generate an error. See also the
keyword (described
The following shows an example use of this pragma.
#pragma linkage_name realfuncname
void funcname ();
void func() {
funcname();
}
#pragma retain_name
The
#pragma retain_name
declaration that follows the pragma is not removed even though Interpro-
cedural Analysis (IPA) sees that it is not used. Use this pragma for C
functions that are only called from assembler routines, such as the startup
code sequence invoked before
The following example shows how to use this pragma.
int delete_me(int x) {
return x-2;
}
#pragma retain_name
int keep_me(int y) {
return y+2;
}
int main(void) {
return 0;
}
Since the program has no uses of either
compiler will remove
pragma. You do not need to specify
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
on page
1-145).
/* compiler will generate a call to
realfuncname */
indicates that the external function or variable
.
main()
, but will keep
delete_me()
retain_name
or
delete_me()
keep_me()
keep_me()
for
main()
Compiler
asm
, the
because of the
.
1-127
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers