https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103810
Bug ID: 103810 Summary: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: documentation Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: egallager at gcc dot gnu.org CC: gingold at adacore dot com Target Milestone: --- So, I'm giving the GCC docs another read-through, and the -fallow-parameterless-variadic-functions docs say: "Accept variadic functions without named parameters. Although it is possible to define such a function, this is not very useful as it is not possible to read the arguments. This is only supported for C as this construct is allowed by C++." However, looking in the testsuite for where this flag is actually tested, I only find gcc/testsuite/gcc.dg/va-arg-5.c which only has a single declaration of the kind allowed by the flag. If the docs are correct that it is possible to define such a function, and not just declare it, shouldn't there be a test for a function definition to go with the declaration? Also, what are you supposed to do with such a declaration/definition after you have it, if you can't read the arguments? You can still call it even if you can't read the arguments, can't you? Shouldn't the testcase test calling it, too, then? (cc-ing person who added the option)