This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C] Issue an error on scalar va_list with reverse storage order
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 08 Dec 2015 18:08:29 +0100
- Subject: Re: [C] Issue an error on scalar va_list with reverse storage order
- Authentication-results: sourceware.org; auth=none
- References: <1548495 dot Pq4l84u6ES at polaris> <5666F885 dot 6060602 at foss dot arm dot com>
> The new gcc.dg/sso-9.c test is failing for aarch64 and arm targets. There's
> no error generated if I compile the test from the command line for
> aarch64-none-elf. GCC for x86_64 does generate the error.
Fixed like so, applied as obvious, thanks for the heads up.
* gcc.dg/sso-9.c (foo): Robustify trick.
--
Eric Botcazou
Index: gcc.dg/sso-9.c
===================================================================
--- gcc.dg/sso-9.c (revision 231394)
+++ gcc.dg/sso-9.c (working copy)
@@ -22,6 +22,6 @@ void foo (int i, ...)
{
struct Rec a;
va_start (a.v, i);
- a.v = a.v, x = va_arg (a.v, int); /* { dg-error "array type|reverse storage order" } */
+ a.v = 0, x = va_arg (a.v, int); /* { dg-error "type|reverse storage order" } */
va_end (a.v);
}