public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/109970] New: -Wstringop-overflow should work with parameter forward declarations
@ 2023-05-25 20:01 muecker at gwdg dot de
  2023-05-26 21:31 ` [Bug c/109970] " cvs-commit at gcc dot gnu.org
  2023-11-03 20:05 ` uecker at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: muecker at gwdg dot de @ 2023-05-25 20:01 UTC (permalink / raw)
  To: gcc-bugs

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

            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

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

end of thread, other threads:[~2023-11-03 20:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-25 20:01 [Bug c/109970] New: -Wstringop-overflow should work with parameter forward declarations muecker at gwdg dot de
2023-05-26 21:31 ` [Bug c/109970] " cvs-commit at gcc dot gnu.org
2023-11-03 20:05 ` uecker 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).