From 1c23bfdfa936854c2d9dffba3e28703381776011 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 13 Oct 2023 09:34:37 +0200 Subject: [PATCH] C99 test suite readiness: Mark some C89 tests Add -std=gnu89 to some tests which evidently target C89-only language features. gcc/testsuite/ * gcc.c-torture/compile/920501-11.c: Compile with -std=gnu89. * gcc.c-torture/compile/920501-23.c: Likewise. * gcc.c-torture/compile/920501-8.c: Likewise. * gcc.c-torture/compile/920701-1.c: Likewise. * gcc.c-torture/compile/930529-1.c: Likewise. --- gcc/testsuite/gcc.c-torture/compile/920501-11.c | 1 + gcc/testsuite/gcc.c-torture/compile/920501-23.c | 1 + gcc/testsuite/gcc.c-torture/compile/920501-8.c | 1 + gcc/testsuite/gcc.c-torture/compile/920701-1.c | 1 + gcc/testsuite/gcc.c-torture/compile/930529-1.c | 1 + 5 files changed, 5 insertions(+) diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-11.c b/gcc/testsuite/gcc.c-torture/compile/920501-11.c index d636357e8673..fccd0c4e1aa0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-11.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-11.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ typedef struct{int s;}S;foo(){int i=(int)&(S){(void*)((int)&(S){1})};} diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-23.c b/gcc/testsuite/gcc.c-torture/compile/920501-23.c index 291d93e6c5d6..2bc8b32e1a06 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-23.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-23.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu89" } */ typedef unsigned char qi; typedef unsigned short hi; typedef unsigned long si; diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-8.c b/gcc/testsuite/gcc.c-torture/compile/920501-8.c index 68e33934d21e..bba64d44e916 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-8.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-8.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ x(int*p){int x=p;} diff --git a/gcc/testsuite/gcc.c-torture/compile/920701-1.c b/gcc/testsuite/gcc.c-torture/compile/920701-1.c index 4302f9ea331a..2a9c83140527 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920701-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920701-1.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ f(char*c){extern char a[],b[];return a+(b-c);} diff --git a/gcc/testsuite/gcc.c-torture/compile/930529-1.c b/gcc/testsuite/gcc.c-torture/compile/930529-1.c index 8ad358dff5a9..4e0bcd8cc049 100644 --- a/gcc/testsuite/gcc.c-torture/compile/930529-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/930529-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target untyped_assembly } */ +/* { dg-additional-options "-std=gnu89" } */ struct r { -- 2.47.2