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
  • [Bug c/109970] New: -Wstringop-... muecker at gwdg dot de via Gcc-bugs

Reply via email to