public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* fixed-point/composite-type: add -Wno-array-parameter
@ 2022-04-01  2:39 Alexandre Oliva
  2022-04-01  6:16 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Oliva @ 2022-04-01  2:39 UTC (permalink / raw)
  To: gcc-patches


On machines that support fixed-point and the test runs, it's failing
because of warnings issued by -Warray-parameter=[12], enabled by
-Wall.

The warnings state "mismatch in bound 1 of argument 1 declared as...",
referring to the redeclaration of f2_##NAME.  The purpose of the
redeclaration is not clear to me.

It doesn't look like the test intends to catch mismatches between
parameter's array lengths, despite the explicit array bound and the
incompatible calls, so I'm adding -Wno-array-parameter to avoid this
distraction and enable the test to pass.

Tested on arm-eabi, where the patch removes the excess errors fail.  Ok
to install?


for gcc/testsuite/ChangeLog

	* gcc.dg/fixed-point/composite-type.c: Add -Wno-array-parameter.
---
 gcc/testsuite/gcc.dg/fixed-point/composite-type.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
index 026bdaf564420..59351ff09b390 100644
--- a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
+++ b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O -Wall -Wno-unused -ftrack-macro-expansion=0" } */
+/* { dg-options "-std=gnu99 -O -Wall -Wno-unused -ftrack-macro-expansion=0 -Wno-array-parameter" } */
 
 /* C99 6.2.7: Compatible type and composite type.  */
 


-- 
Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
   Free Software Activist                       GNU Toolchain Engineer
Disinformation flourishes because many people care deeply about injustice
but very few check the facts.  Ask me about <https://stallmansupport.org>

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

* Re: fixed-point/composite-type: add -Wno-array-parameter
  2022-04-01  2:39 fixed-point/composite-type: add -Wno-array-parameter Alexandre Oliva
@ 2022-04-01  6:16 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2022-04-01  6:16 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: GCC Patches

On Fri, Apr 1, 2022 at 4:40 AM Alexandre Oliva via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
>
> On machines that support fixed-point and the test runs, it's failing
> because of warnings issued by -Warray-parameter=[12], enabled by
> -Wall.
>
> The warnings state "mismatch in bound 1 of argument 1 declared as...",
> referring to the redeclaration of f2_##NAME.  The purpose of the
> redeclaration is not clear to me.
>
> It doesn't look like the test intends to catch mismatches between
> parameter's array lengths, despite the explicit array bound and the
> incompatible calls, so I'm adding -Wno-array-parameter to avoid this
> distraction and enable the test to pass.
>
> Tested on arm-eabi, where the patch removes the excess errors fail.  Ok
> to install?

Sounds reasonable.  OK.

Richard.

>
> for gcc/testsuite/ChangeLog
>
>         * gcc.dg/fixed-point/composite-type.c: Add -Wno-array-parameter.
> ---
>  gcc/testsuite/gcc.dg/fixed-point/composite-type.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
> index 026bdaf564420..59351ff09b390 100644
> --- a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
> +++ b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
> @@ -1,5 +1,5 @@
>  /* { dg-do compile } */
> -/* { dg-options "-std=gnu99 -O -Wall -Wno-unused -ftrack-macro-expansion=0" } */
> +/* { dg-options "-std=gnu99 -O -Wall -Wno-unused -ftrack-macro-expansion=0 -Wno-array-parameter" } */
>
>  /* C99 6.2.7: Compatible type and composite type.  */
>
>
>
> --
> Alexandre Oliva, happy hacker                https://FSFLA.org/blogs/lxo/
>    Free Software Activist                       GNU Toolchain Engineer
> Disinformation flourishes because many people care deeply about injustice
> but very few check the facts.  Ask me about <https://stallmansupport.org>

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

end of thread, other threads:[~2022-04-01  6:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01  2:39 fixed-point/composite-type: add -Wno-array-parameter Alexandre Oliva
2022-04-01  6:16 ` Richard Biener

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).