Summary: | [3.4/4.0 regression] Duplicate parameter names not detected | ||
---|---|---|---|
Product: | gcc | Reporter: | Joseph S. Myers <jsm28> |
Component: | c | Assignee: | Zack Weinberg <zack+srcbugz> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P2 | Keywords: | accepts-invalid |
Version: | 3.4.0 | ||
Target Milestone: | 3.4.0 | ||
Host: | Target: | ||
Build: | Known to work: | 3.3 | |
Known to fail: | Last reconfirmed: | 2004-02-10 23:27:50 | |
Attachments: | pr13728.diff |
Description
Joseph S. Myers
2004-01-18 02:18:55 UTC
Confirmed on mainline/3.4 branch. Oops, I guess that's a regression. Subject: Fix PR 13728 This is the missing diagnostic for void f (int fred, int fred) and a missing diagnostic is precisely what it is. Simply a case that fell through the cracks when I split up duplicate_decls. Fixed thus; bootstrapped i686-linux, applied mainline and 3.4 branch. PR 13728 * c-decl.c (diagnose_mismatched_decls): Issue an error for two parameters with the same name, unless one is a forward decl. Do not issue a redundant-redeclaration warning for forward decls of parameters. * gcc.dg/decl-4.c: New testcase. Created attachment 5858 [details] pr13728.diff Subject: Bug 13728 CVSROOT: /cvs/gcc Module name: gcc Changes by: zack@gcc.gnu.org 2004-03-04 05:49:07 Modified files: gcc : ChangeLog c-decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: decl-4.c Log message: PR 13728 * c-decl.c (diagnose_mismatched_decls): Issue an error for two parameters with the same name, unless one is a forward decl. Do not issue a redundant-redeclaration warning for forward decls of parameters. * gcc.dg/decl-4.c: New testcase. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3030&r2=2.3031 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.481&r2=1.482 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3565&r2=1.3566 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/decl-4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1 Subject: Bug 13728 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: zack@gcc.gnu.org 2004-03-04 05:53:35 Modified files: gcc : ChangeLog c-decl.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: decl-4.c Log message: PR 13728 * c-decl.c (diagnose_mismatched_decls): Issue an error for two parameters with the same name, unless one is a forward decl. Do not issue a redundant-redeclaration warning for forward decls of parameters. * gcc.dg/decl-4.c: New testcase. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.285&r2=2.2326.2.286 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.470.4.5&r2=1.470.4.6 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.119&r2=1.3389.2.120 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/decl-4.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1 there |