public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/102998] New: Wrong documentation for -Warray-parameter
@ 2021-10-29 11:00 roland.illig at gmx dot de
  2021-10-29 11:02 ` [Bug c/102998] " roland.illig at gmx dot de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: roland.illig at gmx dot de @ 2021-10-29 11:00 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-20 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 11:00 [Bug c/102998] New: Wrong documentation for -Warray-parameter roland.illig at gmx dot de
2021-10-29 11:02 ` [Bug c/102998] " roland.illig at gmx dot de
2021-10-29 21:14 ` egallager at gcc dot gnu.org
2024-01-20  0:44 ` sandra at gcc dot gnu.org
2024-01-20  1:43 ` sandra at gcc dot gnu.org
2024-01-20 14:39 ` cvs-commit at gcc dot gnu.org
2024-01-20 16:25 ` sandra at gcc dot gnu.org
2024-01-20 17:18 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).