Click on image to see enlargment
Little Johnny is having some difficulties emulating the properties of his favorite action figures. The program compiles but the linker is giving him grief. What's the problem?
bug1717.cpp lint Output
--- Module: bug1717.cpp (C++) _ Action_Figure train_man(); bug1717.cpp(16) : Info 1717: empty prototype for function declaration, assumed '(void)' _ train_man(); bug1717.cpp(19) : Warning 534: Ignoring return value of function 'train_man(void)' (compare with line 16)
Reference Manual Explanation
1717 empty prototype for function declaration, assumed '(void)' -- An empty prototype, as in: void f(); has a different meaning in C than in C++. In C it says nothing about the arguments of the function; in C++, it says there are no arguments. This message is not given for member function declarations or for function definitions. Rather, weaker Elective Notes (1917 and 1918) are given. This is because the chance of ambiguity does not exist in these cases.
If you have comments or questions about this bug, please post them to our Discussion Forum
Previous Bug - Bug #527 - August 2010