public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "roland.illig at gmx dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/102998] New: Wrong documentation for -Warray-parameter
Date: Fri, 29 Oct 2021 11:00:39 +0000	[thread overview]
Message-ID: <bug-102998-4@http.gcc.gnu.org/bugzilla/> (raw)

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	other threads:[~2021-10-29 11:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 11:00 roland.illig at gmx dot de [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102998-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).