C++: Too many arguments and function definition does not declare parameter

  c++, compiler-errors, header-files

Xcode 4.6.3 on Lion, trying to compile a vnc-based project.

Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix

Compilation stops at the header rdr/OutStream.h:

inline size_t check(size_t itemSize, size_t nItems = 1)

The orders, in sequence, are:

error: too many arguments provided to function-like macro invocation

(with ^ pointing to the third size_t)


function definition does not declare parameters

(with ^ pointing to the "check" before the parentheses)

Can’t really figure it out, even after consulting several other stackoverflow answers focused on one error or the other, but not both. I’m dumbfounded. I don’t think it’s related to using a really old compiler, as the project is equally as old and the specific header file here is from RealVNC with a (C) statement of 2002. (!!) My common sense definitely fails me here, as one error implies the line of code is a macro, while the other declares the line of code is a function definition. (seems paradoxical that the compiler thinks the same line is two different things)

Any ideas?

(Apologies if it’s obvious. I have no formal background in programming, and have just been trying to get an older project to compile. So far I’ve used common sense and googling to knock out all the compilation issues, except this one)

Source: Windows Questions C++