J. David Bryan wrote:
On 16 Oct 2001, at 14:54, Frank Heckenbach wrote:
Please do. It would be easy, of course, to remove the warning, but before I do, I'd like to be sure whether that's the right thing to do.
I will read further and report back, but as far as I can tell, it's legal to omit the program-parameter-list if "input" and "output" are not used implicitly (a citation from the standard that contradicts this would be welcomed). It is certainly syntactically legal, as the syntax specifies that the list is optional. My only uncertainty is whether it is semantically legal.
Actually, I doubt whether the standard would explicitly(!) allow something syntactically if it's invalid semantically in any case.
It appears from a cursory reading that the standard enumerates the cases where "input" and "output" are implied and therefore required to be present in the program-parameter-list. GPC would need to detect those cases and output an error message only if they occur.
It does already. This warning (in the future: error) is already there in addition to the (questionable) warning about `no program parameters specified'.
Also, you wrote:
However, I don't think the standards define warnings at all....
That was actually what I intended with my "bug or feature" comment. If the standard doesn't define warnings, then should warnings about things that are true (i.e., there are no program parameters), but that are not violations of the standard, be considered bugs?
I don't think so. It's certainly useful to have a compiler warn about, say unused variables (though these are valid according to the standard AFAIK). It must not be an error, of course.
Frank