public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103810] New: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better
@ 2021-12-22 21:25 egallager at gcc dot gnu.org
  2021-12-30 23:28 ` [Bug c/103810] " joseph at codesourcery dot com
  2022-06-02 15:37 ` egallager at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-12-22 21:25 UTC (permalink / raw)
  To: gcc-bugs

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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c/103810] -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better
  2021-12-22 21:25 [Bug c/103810] New: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better egallager at gcc dot gnu.org
@ 2021-12-30 23:28 ` joseph at codesourcery dot com
  2022-06-02 15:37 ` egallager at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2021-12-30 23:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103810

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
Note also that there is a proposal for C23 (N2854) to allow such 
functions, including changing the requirements on va_start to make it 
possible to read their arguments.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c/103810] -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better
  2021-12-22 21:25 [Bug c/103810] New: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better egallager at gcc dot gnu.org
  2021-12-30 23:28 ` [Bug c/103810] " joseph at codesourcery dot com
@ 2022-06-02 15:37 ` egallager at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: egallager at gcc dot gnu.org @ 2022-06-02 15:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103810

--- Comment #2 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #1)
> Note also that there is a proposal for C23 (N2854) to allow such 
> functions, including changing the requirements on va_start to make it 
> possible to read their arguments.

OK, but even if it becomes accepted as standard C in C23, I'm assuming the flag
would still stick around for previous standards?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-02 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-22 21:25 [Bug c/103810] New: -fallow-parameterless-variadic-functions flag could use a testcase that covers its documentation better egallager at gcc dot gnu.org
2021-12-30 23:28 ` [Bug c/103810] " joseph at codesourcery dot com
2022-06-02 15:37 ` egallager at gcc dot gnu.org

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).