[Bug c/98536] New: warning with -Wvla-parameter for unspecified bound getting specified later

muecker at gwdg dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 5 15:59:44 GMT 2021


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

            Bug ID: 98536
           Summary: warning  with  -Wvla-parameter for unspecified bound
                    getting specified later
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: muecker at gwdg dot de
  Target Milestone: ---

There is a warning in the following case:


void foo(double x[*]);

void foo(double x[3]) { .. }

or

int n;
void foo(double x[n]) { .. }


should be OK as the bound are compatible.
The type just becomes more specific which should be allowed.

In fact, this is the intended use case of '*' which would otherwise be useless.


More information about the Gcc-bugs mailing list