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.

C2000 compiler not giving error/warning when function is implicitly called.

C2000 compiler not giving error/warning when function is implicitly called.

Function defined in one .c file and used in other .c file without extern.  C2000 compiler is not giving warning or error. Only when -pdsw225 is selected in compiler setting then only it is showing this as warning.

Is there intended behavior of C2000 compiler ?

  • Seems so...It always was this way.

    So we do always have a --diag_error=225 (-pdse225) in our projects to not allow build with implicit defined functions.First thing to do, if starting a new project...

    Roger

  • Shaik Shafi Ahamed said:
    Is there intended behavior of C2000 compiler ?

    Yes.  The compiler has always worked this way.  The language standards do not require a diagnostic to be issued when a function is called without a prototype present.  That said, newly created CCS projects, by default, have the option --diag_warning=225.

    Thanks and regards,

    -George