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.

Compiler: ((void (*)(void))P)() warning

Tool/software: TI C/C++ Compiler

Hi Champs,

My customer wants to use ((void (*)(void))P)(); in their code, but there is a warning about this syntax. Please find the building information as follows.

Would you kindly help to explain why there is a warning, and how to remove it?

Thanks.

BR,

Young

  • I failed to reproduce that diagnostic.  But I think Header.uiLoadAddress must be unsigned int (or something similar) and you are trying to use it as the address of a function.  It appears you are doing this intentionally.  If you are sure, then you can ignore this warning diagnostic.  If you would like, you can suppress it completely by adding the build option --diag_suppress=1311.  Please read more about diagnostics in the section titled Understanding Diagnostic Messages in the C2000 compiler manual.

    Thanks and regards,

    -George