From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2ADF63858D39; Thu, 25 May 2023 20:01:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2ADF63858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685044874; bh=gbmKfMwCjIy1DYLWxhkQ0ytU60T7vxNULWEaf8KFtDk=; h=From:To:Subject:Date:From; b=FOizRyLO2sxOLWG69x4RpECHctJkj1zM6VZzngnupsiRyCPB4C2UZwa1wVD671VsM 52lS5I9JJJUt4zoxmmI/wggrbhd692XaVfxNy3l6kaj86H9zpZnrNX9mJt27/iMgSz V87NSItBp88UTYudqsbsPJKAlGZCtFU0Wm4Q8nfs= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109970] New: -Wstringop-overflow should work with parameter forward declarations Date: Thu, 25 May 2023 20:01:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: muecker at gwdg dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109970 Bug ID: 109970 Summary: -Wstringop-overflow should work with parameter forward declarations Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: muecker at gwdg dot de Target Milestone: --- For bar I get the expected warning but not for foo. void bar(int x, char buf[x]); void foo(int x; char buf[x], int x); int main() { char buf[10]; bar(11, buf); foo(buf, 11); } https://godbolt.org/z/zhzr43c55=