public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Terry Moreland <tmorelan@q.cis.uoguelph.ca> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: c/6968: functions that shouldn't accept arguments accept infinite arguments (eg; test() ) Date: Sat, 08 Jun 2002 12:46:00 -0000 [thread overview] Message-ID: <20020608194602.18727.qmail@sources.redhat.com> (raw) The following reply was made to PR c/6968; it has been noted by GNATS. From: Terry Moreland <tmorelan@q.cis.uoguelph.ca> To: "Joseph S. Myers" <jsm28@cam.ac.uk> Cc: zack@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>, <gcc-gnats@gcc.gnu.org> Subject: Re: c/6968: functions that shouldn't accept arguments accept infinite arguments (eg; test() ) Date: Sat, 8 Jun 2002 15:29:18 -0400 (EDT) ok, I'll accept that, but still passing arguments to a function defined in this way should still produce a warning since the arguments are inaccessible from within the function and it just looks wrong Terry On Sat, 8 Jun 2002, Joseph S. Myers wrote: > On Sat, 8 Jun 2002, Terry Moreland wrote: > > > mean that in c99 void test() is a function that takes no arguments since > > enmpty identifier list is part of the function definition and as such the > > void test() example should produce an error in c99, but doesn't in gcc 3.1 using > > -std=c99 > > > > please let me know if I am wrong, I have slept in a while and the iso c99 spec > > can be very wordy at times > > It specifies, for the purposes of the definition, that it has no > parameters. It does not, for the purposes of subsequent calls to the > function, give it a type that includes a prototype, so the subsequent > calls are not checked. > > -- -------------------------------------------------------- Terry Moreland | Computer and Information Science tmorelan@uoguelph.ca | University of Guelph If you were plowing a field, which would you rather use? Two strong oxen or 1024 chickens? - Seymour Cray (1925-1996), father of supercomputing --------------------------------------------------------
next reply other threads:[~2002-06-08 19:46 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-06-08 12:46 Terry Moreland [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-06-08 2:46 Joseph S. Myers 2002-06-07 23:56 Terry Moreland 2002-06-07 22:56 zack 2002-06-07 18:16 tmorelan
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=20020608194602.18727.qmail@sources.redhat.com \ --to=tmorelan@q.cis.uoguelph.ca \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).