First of all, a distinction must be made between the declaration in the implementation and the call of a function. The following line is not a declaration but an assignment:
iretv = RetIntDayNum(cdatestring, &idaynum, &iostat);
VS2019 usually always generates an error if it cannot find a suitable implementation for the call.
The call of
iretv = RetIntDayNum(cdatestring, &idaynum);
causes error C2198: "RetIntDayNum": Not enough arguments for call.
or error C2660: "RetIntDayNum": Function does not accept 2 arguments
As VS2019 is a C++ compiler, several questions may arise.
Is the code compiled as C or C++ code and with which compiler version? VS2019 can basically compile with the following standards: C++14, C++17, C++20, Legacy MSVC, std:c11, std:c17.
The only explanation I can think of for the described behavior is that somewhere there is another function with the same name and only 2 parameters.
The question of whether the program can "explode" after (error-free) compilation due to the missing parameter cannot be answered, as it is not known what the functions actually do.
In any case, you could only access variables that are also visible to the compiler. If there are global variables with the same name, this could be unpleasant.