-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-13361
-
-
-
default
This code ...
#pragma FUNCTION_OPTIONS(fxn, "--opt_level=3")
#pragma FUNC_EXT_CALLED(fxn)
int fxn(int arg)
{
return arg + 3;
}
... compiles clean with TI Arm compiler armcl. And even though only --opt_level=0 is used, it is optimized at level 3. Try the same thing with tiarmclang ...
% tiarmclang -c file.c
file.c:2:9: warning: pragma FUNC_EXT_CALLED is a legacy TI pragma and not supported in clang
compilers. [-Wti-pragmas]
2 | #pragma FUNC_EXT_CALLED(fxn)
| ^
1 warning generated.
A diagnostic is emitted for FUNC_EXT_CALLED. A diagnostic is expected for FUNCTION_OPTIONS, but it does not appear. Furthermore, the generated code is not optimized.