Hello,
I am trying to find the compiler directive for ‘DEPRECATED’ warning for a function in TMS470 compiler.
I tried using the words ‘DEPRECATE’ and ‘DEPRECATED’ associating it with a function. However when compiled, CCS threw the warning as “unrecognized #pragma”.
I have mentioned the exact code snippet below.
#ifdef __TMS470__
#pragma DEPRECATED(UARTSoftwareFlowCtrlOptSet)
extern void UARTSoftwareFlowCtrlOptSet(unsigned int baseAdd,
unsigned int swFlowCtrl);
#endif
Then I tried using the attribute used for GCC for TMS470 also. The code is given below.
#if defined (__TMS470__) || defined (gcc)
extern void UARTSoftwareFlowCtrlOptSet(unsigned int baseAdd,
unsigned int swFlowCtrl) __attribute__ ((deprecated));
#endif
For TMS470 to recognize the GCC attribute, I enabled the option “Enable support for GCC extensions (--gcc) “ in Language Options of the CCS project. Now I built the project and observed that CCS gave the desired warning for the deprecated function.
Now my question is that whether TMS470 has its own directive for ‘Deprecated’?
Thanks for your effort in advance.
Thanks and Regards.
Gurudutt.