expected '=', ',', ';', 'asm' or '__attribute__'
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'foo_t'
This error message can appear on compilation of .c file, whose very first function is :
foo_t bar(void)
{
/* ... */
}
This signalize that ';' is missing before your function and adding it would surely solve the problem, like this :
; foo_t bar(void)
{
/* ... */
}
But that is only placebo. Real problem comes actually from the missing ';' in include file, foo.h, that is included and unrolled by preprocessor right before the definition of the bar() in your .c file. For example, last lines of foo.h might be :
/* ... */
typedef baz_t (* handler)(int arg1, int arg2) <--- MISSING ';'
#endif /* FOO_H */
This error message can appear on compilation of .c file, whose very first function is :
foo_t bar(void)
{
/* ... */
}
This signalize that ';' is missing before your function and adding it would surely solve the problem, like this :
; foo_t bar(void)
{
/* ... */
}
But that is only placebo. Real problem comes actually from the missing ';' in include file, foo.h, that is included and unrolled by preprocessor right before the definition of the bar() in your .c file. For example, last lines of foo.h might be :
/* ... */
typedef baz_t (* handler)(int arg1, int arg2) <--- MISSING ';'
#endif /* FOO_H */
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home