public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "egallager at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/103810] New: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better Date: Wed, 22 Dec 2021 21:25:00 +0000 [thread overview] Message-ID: <bug-103810-4@http.gcc.gnu.org/bugzilla/> (raw) 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)
next reply other threads:[~2021-12-22 21:25 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-22 21:25 egallager at gcc dot gnu.org [this message] 2021-12-30 23:28 ` [Bug c/103810] " joseph at codesourcery dot com 2022-06-02 15:37 ` egallager at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103810-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).