This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

#warning doesnt work with tms470 v5

Looks like #pragma message is not supported in TMS470?

Also I couldnt get exact syntax for #warning?

Can you give the exact syntax. I am using ccs 5.0.4

  • This is a feature of most C compilers which is not specified in the C89 or C99 standards.  In the TI compiler it is ...

    #warn your message here

    Thanks and regards,

    -George

  • to implement deprecated warming i have something like,

    /*  Deprecated function - Compiler message */
    #ifdef __GNUC__
        #define DEPRECATED(func) func __attribute__ ((deprecated))
    #elif defined (__TMS470__)
        #define DEPRECATED(func) func
        #warn Some of the DEPRECATED functions are used, please use migrate to supported functions
    #elif defined (__IAR_SYSTEMS_ICC__)
        #define DEPRECATED(func) func
        #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
    #else
        #error unsupported compiler!!!
    #endif

    For CCS, it gives the line number where #warn is defined and i want the line number of the deprecated function.

    Do you have better suggestion for this issue.

    Thanks

    Baskaran

  • The TI compilers support many GCC extensions, including the deprecated function attribute.  You have to build with the switch --gcc.  Please see this wiki page for the details.

    Thanks and regards,

    -George