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.

Reply via email to