Search code examples
c++visual-c++visual-c++-2013

Can Visual C++ check for mismatched prototype and implementation?


Can the VC compiler warn if it cannot find an implementation of a prototype?

Example (notice mismatching params):

// calcSomething.h
int calcSomething(
    int    year,
    int    month,
    int    day,
    int    hour,
    int    minute,
    int    second
);

and

// calcSomething.cpp
int calcSomething(
    int    year,
    int    month,
    int    day
) 
{
  // ... implementation
}

Update: Apparently G++ has a switch called -Wmissing-declarations which I think might be along the lines of what I need, but obviously for VC++.


Solution

  • It appears the answer is no. The MSVC compiler does not have an option equivalent to G++'s -Wmissing-declarations.

    Command line options by category.