public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dale Johannesen <dalej@apple.com>
To: gcc mailing list <gcc@gcc.gnu.org>
Cc: Dale Johannesen <dalej@apple.com>
Subject: Regression in 4.0 (sort of)
Date: Mon, 13 Dec 2004 03:53:00 -0000	[thread overview]
Message-ID: <54439D34-4CBA-11D9-A514-000A95D7D16C@apple.com> (raw)

Consider the nonstandard C program

main() {
   foo();
}
void foo() {
}

Previous versions of gcc accepted this with a warning; 4.0 gives an 
error.
This appears to date to Zack's rewrite of duplicate_decls early this 
year.
Naturally, this is causing some programs not to compile any more.
Geoff thinks this may be unintentional, and certainly it doesn't seem 
that
any bugs that would actually cause anything to break would slip through
if we treated it as a warning.  Is this an intentional change?

The following exception is already made for a different, but quite 
similar, case.
       /* Permit void foo (...) to match int foo (...) if the latter is
          the definition and implicit int was used.  See
          c-torture/compile/920625-2.c.  */

             reply	other threads:[~2004-12-13  3:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-13  3:53 Dale Johannesen [this message]
2004-12-13  4:07 ` Zack Weinberg
2004-12-13 16:43   ` Dale Johannesen

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=54439D34-4CBA-11D9-A514-000A95D7D16C@apple.com \
    --to=dalej@apple.com \
    --cc=gcc@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: link
Be 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).