I think it is easy for those who spend a lot of time hanging out here on the "Programming Questions" section of the Arduino forum to get an exaggerated sense of the opposition to such a feature due to the fact that a small number (likely less than a dozen) of active forum members express their dislike of it here at every opportunity.
So you are going to see that opinion regularly here, but if you look more closely you would notice it is coming from the same few people every time.
The converse is not true. There is no reason for the ones who think it is useful to express that opinion on every forum thread where the prototype generation system worked perfectly.
Just yesterday I was thinking it would be useful to make a collection of MCVE for each distinct class of code that is not correctly handled by the Arduino sketch preprocessor, accompanied by instructions for its workaround.
I think it is a good idea.
In this specific case, the build system knows the prototype was skipped:
So you could add some output there with something like this:
ctx.Warn(tr("%[1]s:%[2]d: warning: skipped prototype generation for function with default parameter value", proto.File, proto.Line))
To get warnings like this:
C:\Users\asdf\Documents\Arduino\Foo\Foo.ino:5: warning: skipped prototype generation for function with default parameter value
However, I think it would be better to do a more sophisticated implementation where they are printed only when the compilation fails. I don't think people need to be informed of this in the case where a prototype was not necessary:
void foo(int x = 42) {}
void setup() {
foo();
}
void loop() {}
A similar thing was done with the output of the list of libraries used by the sketch:
Unfortunately, I suspect in other cases detecting the problem is more difficult, perhaps even more so than just fixing the deficiency in the Arduino sketch preprocessor.