[Bug c/109970] New: -Wstringop-overflow should work with parameter forward declarations
muecker at gwdg dot de
gcc-bugzilla@gcc.gnu.org
Thu May 25 20:01:13 GMT 2023
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
More information about the Gcc-bugs
mailing list