From a53cb18d1cc722d610665442d60b41c758b89a0f Mon Sep 17 00:00:00 2001 From: Sudakshina Das Date: Wed, 15 Nov 2017 15:21:03 +0000 Subject: [PATCH] [ARM] Fix more -Wreturn-type fallout This patch fixes a couple of more tests that are giving out warnings with -Wreturn-type: - g++.dg/ext/pr57735.C - gcc.target/arm/pr54300.C *** gcc/testsuite/ChangeLog *** 2017-11-10 Sudakshina Das * g++.dg/ext/pr57735.C: Add -Wno-return-type for test. * gcc.target/arm/pr54300.C (main): Add return type and return a value. From-SVN: r254773 --- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/g++.dg/ext/pr57735.C | 2 +- gcc/testsuite/gcc.target/arm/pr54300.C | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a805be4eb14..fe4520df2af 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-11-15 Sudakshina Das + + * g++.dg/ext/pr57735.C: Add -Wno-return-type for test. + * gcc.target/arm/pr54300.C (main): Add return type and + return a value. + 2017-11-15 Tom de Vries * gcc.dg/strncpy-fix-1.c: Add -Wno-stringop-truncation to dg-options. diff --git a/gcc/testsuite/g++.dg/ext/pr57735.C b/gcc/testsuite/g++.dg/ext/pr57735.C index a8f7d05712c..d9fc9e4aa5e 100644 --- a/gcc/testsuite/g++.dg/ext/pr57735.C +++ b/gcc/testsuite/g++.dg/ext/pr57735.C @@ -2,7 +2,7 @@ /* { dg-require-effective-target arm_arch_v5te_ok } */ /* { dg-require-effective-target arm_arm_ok } */ /* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=soft" } } */ -/* { dg-options "-march=armv5te -marm -mtune=xscale -mfloat-abi=soft -O1" } */ +/* { dg-options "-march=armv5te -marm -mtune=xscale -mfloat-abi=soft -O1 -Wno-return-type" } */ typedef unsigned int size_t; __extension__ diff --git a/gcc/testsuite/gcc.target/arm/pr54300.C b/gcc/testsuite/gcc.target/arm/pr54300.C index eb1a74e36cf..9105e279b33 100644 --- a/gcc/testsuite/gcc.target/arm/pr54300.C +++ b/gcc/testsuite/gcc.target/arm/pr54300.C @@ -51,6 +51,7 @@ test(unsigned short *_Inp, int32_t *_Out, vst1q_s32( _Out, c ); } +int main() { unsigned short a[4] = {1, 2, 3, 4}; @@ -58,4 +59,5 @@ main() test(a, b, 1, 1, ~0); if (b[0] != 1 || b[1] != 2 || b[2] != 3 || b[3] != 4) abort(); + return 0; } -- 2.30.2