> > That is rather unclear, unfortunately. > > The question is what "the type" means. > > The type of the function. It's entirely clear, give up. > > that's now an argument? > > As far as I am aware, 8.3.5 only *mentions* the "equivalence of types", > > but does not say where this is applicable. > > int main(void) and int main() declare the same function. It has the > same type, because it's the same function. > You won't find this in the standard. Which is a problem! Being involved with the "safety-and-security" industry, I can see the enormous problems caused by such "standards". Nevertheless, the C++ standard has an important social role. > > And in any case, for that to work, the option "std=c++14" had to be > > used, or? > > No, for several reasons including that G++ applies DRs retroactively > and G++ has **always** accepted int main(void) as a valid definition > for main. > > But in any case the OP is using GCC 6, so the default is -std=gnu++14. > That's fine. > Seriously, why are you still banging on about this? > Because we are language lawyers! > > > Anyway, just removing the "void" seems to me the clearest solution. > > But doesn't fix the OP's problem and is totally irrelevant. > "Totally irrelevant"? The laywer knows that "totally" does not add, but substracts from "irrelevant" ;-) Would you teach such code, as Hello-World, the first program a C++ learner sees? > > And according to > > C++ Standard Core Language Defect Reports and Accepted Issues, > > Revision 96 > > > > Issues with DR, accepted, DRWP, and WP status are NOT part of the > > International Standard for C++. > > Don't know about "CD3", but it appears that is still not "in", or? > > Irrelevant, the modified wording is part of C++14, which is the only > C++ standard that is still an ISO standard. > > Is there any need for this continued pedantry? The OP's code is valid. > > Give it a rest. It's up to gcc anyway. Doesn't matter to me. Don't worry.