[EXT_EP-12181] tiarmclang silently ignores #pragma FUNCTION_OPTIONS, when a diagnostic is expected Created: 24/Jan/25 Updated: 27/Jan/25 Resolved: 27/Jan/25 |
|
Status: | Fixed |
Project: | Embedded Software & Tools |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Medium |
Reporter: | TI User | Assignee: | TI User |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Product: | Code Generation Tools |
Internal ID: | CODEGEN-13361 |
Forum URL: | https://e2e.ti.com/support/processors-group/processors---internal/f/1045/t/1466499 |
Found In Release: | ARMCLANG_4.0.0.LTS ARMCLANG_3.2.0.LTS |
Fix In Release: | ARMCLANG_3.2.4.LTS* ARMCLANG_4.0.2.LTS* |
Affected Platform/Device: | default |
Description |
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. |