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.
Tool/software: TI C/C++ Compiler
Hi,
In the following code
// *********** test *********************
int global_var_a;
int global_var_b;
static inline void Func2(void);
static void Func1(void);
static void Func1(void)
{
global_var_a++;
Func2();
}
static void Func2(void)
{
global_var_b++;
}
// *********** test end *********************
I get no warning about mismatch between definition and declaration of Func2 (missing inline).
Is this intended or a (minor) compiler error?
Regards,
Stephan
StephanS said:Is this intended or a (minor) compiler error?
It is not an error. I checked the C99 ANSI standard for C. It is silent on whether the inline is required in both the function declaration and definition. I also tried a recent GCC compiler, and it does not issue any diagnostic.
Thanks and regards,
-George