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

            Bug ID: 102998
           Summary: Wrong documentation for -Warray-parameter
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html says:
> For example, the warning triggers for the following redeclarations because
> the first one allows an array of any size to be passed to f while the second
> one with the keyword static specifies that the array argument must have at
> least four elements.
>
> void f (int[static 4]);
> void f (int[]);           // warning (inconsistent array form)

1. The words 'first' and 'second' should be swapped.
2. Why should there be a warning? The array from malloc is large enough, it has
exactly 4 elements.

Reply via email to