Reputation: 25268
I have reduced the problem to these lines:
typedef __int64 int64;
inline int64 qatoll(const char *nptr) { return _atoi64(nptr); }
When compiling in C mode with VC++2008 or 2010 I get errors:
t.c(2) : error C2054: expected '(' to follow 'inline'
t.c(2) : error C2085: 'qatoll' : not in formal parameter list
t.c(2) : error C2143: syntax error : missing ';' before '{'
In C++ mode it does accept the function definition and only complains about _atoi64
.
What is the problem and how can I fix it?
Visual C++ 15 compiles it without errors, so is this related to C99 support?
Upvotes: 0
Views: 204
Reputation: 34560
It is not the __int64
which is the problem, but the inline
syntax which should be _inline
.
I just tried similar code on an older machine running MSVC 2008 to verify this.
Upvotes: 2