aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-11-06 14:41:35 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-11-06 13:41:35 +0000
commit454f8b2b0c6f9645b3df6be98efe2ca520f2ce82 (patch)
treeffe7d782cda90da84b0baf13883d5da72a8f3eb2
parent98910bc2b97f248d158b301575c24597fd12ab34 (diff)
downloadgcc-454f8b2b0c6f9645b3df6be98efe2ca520f2ce82.zip
gcc-454f8b2b0c6f9645b3df6be98efe2ca520f2ce82.tar.gz
gcc-454f8b2b0c6f9645b3df6be98efe2ca520f2ce82.tar.bz2
Fix -Wreturn-type fallout.
2017-11-06 Martin Liska <mliska@suse.cz> * c-c++-common/cilk-plus/AN/pr57541-2.c (foo1): Return a value for functions with non-void return type, or change type to void, or add -Wno-return-type for test. (foo2): Likewise. * c-c++-common/cilk-plus/AN/pr57541.c (foo): Likewise. (foo1): Likewise. * c-c++-common/cilk-plus/CK/errors.c: Likewise. * c-c++-common/cilk-plus/CK/pr60197.c: Likewise. * c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise. * c-c++-common/fold-masked-cmp-1.c (test_pic): Likewise. (test_exe): Likewise. * c-c++-common/fold-masked-cmp-2.c (test_exe): Likewise. * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc (my_func): Likewise. * g++.dg/cilk-plus/CK/pr68997.cc (fa2): Likewise. * g++.dg/eh/sighandle.C (dosegv): Likewise. * g++.dg/ext/vector14.C (foo): Likewise. (main): Likewise. * g++.dg/graphite/pr41305.C: Likewise. * g++.dg/graphite/pr42930.C: Likewise. * g++.dg/opt/pr46640.C (struct QBasicAtomicInt): Likewise. (makeDir): Likewise. * g++.dg/other/i386-8.C (foo): Likewise. * g++.dg/pr45788.C: Likewise. * g++.dg/pr64688.C (at_c): Likewise. * g++.dg/pr65032.C (G::DecodeVorbis): Likewise. * g++.dg/pr71633.C (c3::fn2): Likewise. * g++.dg/stackprotectexplicit2.C (A): Likewise. * g++.old-deja/g++.law/weak.C (main): Likewise. 2017-11-06 Martin Liska <mliska@suse.cz> * testsuite/libgomp.c++/loop-2.C: Return a value for functions with non-void return type, or change type to void, or add -Wno-return-type for test. * testsuite/libgomp.c++/loop-4.C: Likewise. * testsuite/libgomp.c++/parallel-1.C: Likewise. * testsuite/libgomp.c++/shared-1.C: Likewise. * testsuite/libgomp.c++/single-1.C: Likewise. * testsuite/libgomp.c++/single-2.C: Likewise. 2017-11-06 Martin Liska <mliska@suse.cz> * testsuite/27_io/basic_fstream/cons/char/path.cc (main): Return a value for functions with non-void return type, or change type to void, or add -Wno-return-type for test. * testsuite/27_io/basic_ifstream/cons/char/path.cc (main): Likewise. * testsuite/27_io/basic_ofstream/open/char/path.cc (main): Likewise. From-SVN: r254451
-rw-r--r--gcc/testsuite/ChangeLog31
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c4
-rwxr-xr-xgcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c9
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/errors.c2
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c2
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c2
-rw-r--r--gcc/testsuite/c-c++-common/fold-masked-cmp-1.c4
-rw-r--r--gcc/testsuite/c-c++-common/fold-masked-cmp-2.c2
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc2
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc2
-rw-r--r--gcc/testsuite/g++.dg/eh/sighandle.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/vector14.C8
-rw-r--r--gcc/testsuite/g++.dg/graphite/pr41305.C2
-rw-r--r--gcc/testsuite/g++.dg/graphite/pr42930.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/pr46640.C3
-rw-r--r--gcc/testsuite/g++.dg/other/i386-8.C2
-rw-r--r--gcc/testsuite/g++.dg/pr45788.C2
-rw-r--r--gcc/testsuite/g++.dg/pr64688.C5
-rw-r--r--gcc/testsuite/g++.dg/pr65032.C2
-rw-r--r--gcc/testsuite/g++.dg/pr71633.C1
-rw-r--r--gcc/testsuite/g++.dg/stackprotectexplicit2.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/weak.C2
-rw-r--r--libgomp/ChangeLog11
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-2.C1
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-4.C1
-rw-r--r--libgomp/testsuite/libgomp.c++/parallel-1.C1
-rw-r--r--libgomp/testsuite/libgomp.c++/shared-1.C1
-rw-r--r--libgomp/testsuite/libgomp.c++/single-1.C1
-rw-r--r--libgomp/testsuite/libgomp.c++/single-2.C1
-rw-r--r--libstdc++-v3/ChangeLog10
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc1
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc1
-rw-r--r--libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc1
33 files changed, 103 insertions, 20 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1c3a2fa..1d5ba34 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,34 @@
+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * c-c++-common/cilk-plus/AN/pr57541-2.c (foo1): Return a value
+ for functions with non-void return type, or change type to void,
+ or add -Wno-return-type for test.
+ (foo2): Likewise.
+ * c-c++-common/cilk-plus/AN/pr57541.c (foo): Likewise.
+ (foo1): Likewise.
+ * c-c++-common/cilk-plus/CK/errors.c: Likewise.
+ * c-c++-common/cilk-plus/CK/pr60197.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise.
+ * c-c++-common/fold-masked-cmp-1.c (test_pic): Likewise.
+ (test_exe): Likewise.
+ * c-c++-common/fold-masked-cmp-2.c (test_exe): Likewise.
+ * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc (my_func): Likewise.
+ * g++.dg/cilk-plus/CK/pr68997.cc (fa2): Likewise.
+ * g++.dg/eh/sighandle.C (dosegv): Likewise.
+ * g++.dg/ext/vector14.C (foo): Likewise.
+ (main): Likewise.
+ * g++.dg/graphite/pr41305.C: Likewise.
+ * g++.dg/graphite/pr42930.C: Likewise.
+ * g++.dg/opt/pr46640.C (struct QBasicAtomicInt): Likewise.
+ (makeDir): Likewise.
+ * g++.dg/other/i386-8.C (foo): Likewise.
+ * g++.dg/pr45788.C: Likewise.
+ * g++.dg/pr64688.C (at_c): Likewise.
+ * g++.dg/pr65032.C (G::DecodeVorbis): Likewise.
+ * g++.dg/pr71633.C (c3::fn2): Likewise.
+ * g++.dg/stackprotectexplicit2.C (A): Likewise.
+ * g++.old-deja/g++.law/weak.C (main): Likewise.
+
2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/gcov: New directory.
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
index 83325a7..89a3d57 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
@@ -2,13 +2,13 @@
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
-int foo1 ()
+void foo1 ()
{
int a;
a = __sec_reduce_add (1); /* { dg-error "Invalid builtin arguments" } */
}
-int foo2 ()
+void foo2 ()
{
int a;
a = __sec_reduce_add (); /* { dg-error "Invalid builtin arguments" } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
index a956d0e..b47de1e 100755
--- a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
@@ -4,8 +4,7 @@
int A[10];
-int foo () {
-
+void foo () {
/* C compiler uses the term "undeclared" whereas C++ compiler uses
"not declared". Thus, grepping for declared seem to be the easiest. */
char c = (char)N; /* { dg-error "declared" } */
@@ -15,12 +14,8 @@ int foo () {
A[l:s:c];
}
-int foo1 (int N) {
-
+void foo1 (int N) {
char c = (char)N;
short s = (short)N;
A[l:s:c]; /* { dg-error "declared" } */
}
-
-
-
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/errors.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/errors.c
index b1e336e..d637924 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/CK/errors.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/errors.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
int func_2(void);
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c
index 2b47d1e..301a6f2 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c
@@ -1,6 +1,6 @@
/* PR c/60197 */
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
extern int foo (void);
extern int bar (int);
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c
index 14b7eef..602971e 100644
--- a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
int main (void)
{
diff --git a/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c b/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c
index c56adc4..658cc09 100644
--- a/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c
+++ b/gcc/testsuite/c-c++-common/fold-masked-cmp-1.c
@@ -29,13 +29,15 @@ int result;
void test_pic (struct bfd_link_info *info)
{
if (bfd_link_pic (info))
- result++;
+ result++;
}
int test_exe (struct bfd_link_info *info)
{
if (bfd_link_executable (info))
result++;
+
+ return 0;
}
/* { dg-final { scan-assembler-times "testn?b" 2 } } */
diff --git a/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c b/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c
index a14bceb..c95cc56 100644
--- a/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c
+++ b/gcc/testsuite/c-c++-common/fold-masked-cmp-2.c
@@ -36,6 +36,8 @@ int test_exe (struct bfd_link_info *info)
{
if (bfd_link_executable (info))
result++;
+
+ return 0;
}
/* { dg-final { scan-assembler-times "testn?b" 2 } } */
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc
index db81912..111a2a2 100644
--- a/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc
@@ -15,6 +15,8 @@ T my_func (T *x, T y)
*x = y;
else
*x = *x;
+
+ return T();
}
template <class T> T my_func (T *x, T y);
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc
index b442bf9..a9a8a51 100644
--- a/gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/pr68997.cc
@@ -16,7 +16,7 @@ struct A2 {
};
A2 fa2 () {
- A2 ();
+ return A2 ();
}
struct B1 {
diff --git a/gcc/testsuite/g++.dg/eh/sighandle.C b/gcc/testsuite/g++.dg/eh/sighandle.C
index 5c4995e..c220002 100644
--- a/gcc/testsuite/g++.dg/eh/sighandle.C
+++ b/gcc/testsuite/g++.dg/eh/sighandle.C
@@ -12,6 +12,7 @@ void sighandler (int signo, siginfo_t * si, void * uc)
char * dosegv ()
{
* ((volatile int *)0) = 12;
+ return 0;
}
int main ()
diff --git a/gcc/testsuite/g++.dg/ext/vector14.C b/gcc/testsuite/g++.dg/ext/vector14.C
index 8e79210..eecff39 100644
--- a/gcc/testsuite/g++.dg/ext/vector14.C
+++ b/gcc/testsuite/g++.dg/ext/vector14.C
@@ -8,7 +8,11 @@
#define vector __attribute__((vector_size(16)))
-template<int N> vector signed int foo (vector float value) {}
+template<int N> vector signed int foo (vector float value)
+{
+ vector signed int a;
+ return a;
+}
template<int> void foo (float) {}
@@ -19,4 +23,6 @@ main ()
float f;
foo<1> (v);
foo<1> (f);
+
+ return 0;
}
diff --git a/gcc/testsuite/g++.dg/graphite/pr41305.C b/gcc/testsuite/g++.dg/graphite/pr41305.C
index 6a30b0e..756b126 100644
--- a/gcc/testsuite/g++.dg/graphite/pr41305.C
+++ b/gcc/testsuite/g++.dg/graphite/pr41305.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-O3 -floop-interchange -Wno-conversion-null" }
+// { dg-options "-O3 -floop-interchange -Wno-conversion-null -Wno-return-type" }
void __throw_bad_alloc ();
diff --git a/gcc/testsuite/g++.dg/graphite/pr42930.C b/gcc/testsuite/g++.dg/graphite/pr42930.C
index c1150ce..e569cea 100644
--- a/gcc/testsuite/g++.dg/graphite/pr42930.C
+++ b/gcc/testsuite/g++.dg/graphite/pr42930.C
@@ -1,4 +1,4 @@
-/* { dg-options "-O1 -floop-block" } */
+/* { dg-options "-O1 -floop-block -Wno-return-type" } */
typedef unsigned char byte;
typedef unsigned int uint;
diff --git a/gcc/testsuite/g++.dg/opt/pr46640.C b/gcc/testsuite/g++.dg/opt/pr46640.C
index 1c25778..b55afd4 100644
--- a/gcc/testsuite/g++.dg/opt/pr46640.C
+++ b/gcc/testsuite/g++.dg/opt/pr46640.C
@@ -7,6 +7,7 @@ struct QBasicAtomicInt
bool deref ()
{
asm volatile ("":"=m" (i), "=qm" (j));
+ return true;
}
};
@@ -41,4 +42,6 @@ bool makeDir (unsigned len)
return false;
i = pos;
}
+
+ return true;
}
diff --git a/gcc/testsuite/g++.dg/other/i386-8.C b/gcc/testsuite/g++.dg/other/i386-8.C
index cf833a5..a9465ef 100644
--- a/gcc/testsuite/g++.dg/other/i386-8.C
+++ b/gcc/testsuite/g++.dg/other/i386-8.C
@@ -19,4 +19,6 @@ foo (float *x, short *y)
__m64 c = _mm_cvtps_pi16 (b);
__builtin_memcpy (y, &c, sizeof (short) * 4);
y[0] = bar (y[0]);
+
+ return 0;
}
diff --git a/gcc/testsuite/g++.dg/pr45788.C b/gcc/testsuite/g++.dg/pr45788.C
index 0f4db20..9148585 100644
--- a/gcc/testsuite/g++.dg/pr45788.C
+++ b/gcc/testsuite/g++.dg/pr45788.C
@@ -1,5 +1,5 @@
// { dg-do compile { target i?86-*-* x86_64-*-* } }
-// { dg-options "-O3 -fwhole-program -msse2" }
+// { dg-options "-O3 -fwhole-program -msse2 -Wno-return-type" }
typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t;
diff --git a/gcc/testsuite/g++.dg/pr64688.C b/gcc/testsuite/g++.dg/pr64688.C
index 3525e49b..bf85f1a 100644
--- a/gcc/testsuite/g++.dg/pr64688.C
+++ b/gcc/testsuite/g++.dg/pr64688.C
@@ -24,7 +24,10 @@ template <typename> struct F;
template <typename> struct G;
template <typename, typename, int> struct H;
template <typename Element, typename Layout> struct H<Element, Layout, 3> {};
-template <int, typename E, typename L, int N> unsigned char at_c(H<E, L, N>) {}
+template <int, typename E, typename L, int N> unsigned char at_c(H<E, L, N>)
+{
+ return 0;
+}
template <typename> class I;
template <typename> class J;
template <typename> class K;
diff --git a/gcc/testsuite/g++.dg/pr65032.C b/gcc/testsuite/g++.dg/pr65032.C
index a62f50b..d6b6768d 100644
--- a/gcc/testsuite/g++.dg/pr65032.C
+++ b/gcc/testsuite/g++.dg/pr65032.C
@@ -84,4 +84,6 @@ G::DecodeVorbis (int *p1)
mDecodedAudioFrames -= b;
fn2 (b);
}
+
+ return nsresult();
}
diff --git a/gcc/testsuite/g++.dg/pr71633.C b/gcc/testsuite/g++.dg/pr71633.C
index 48e9c98..8852695 100644
--- a/gcc/testsuite/g++.dg/pr71633.C
+++ b/gcc/testsuite/g++.dg/pr71633.C
@@ -20,6 +20,7 @@ class c3 : c1, c2
int *c3::fn2 () const
{
+ return 0;
}
int *c3::fn3 (int p) const
diff --git a/gcc/testsuite/g++.dg/stackprotectexplicit2.C b/gcc/testsuite/g++.dg/stackprotectexplicit2.C
index 9cf9ab9..35d9e88 100644
--- a/gcc/testsuite/g++.dg/stackprotectexplicit2.C
+++ b/gcc/testsuite/g++.dg/stackprotectexplicit2.C
@@ -7,6 +7,7 @@ int A()
{
int A[23];
char b[22];
+ return 0;
}
int __attribute__((stack_protect)) B()
@@ -24,4 +25,4 @@ int __attribute__((stack_protect)) c()
}
-/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */ \ No newline at end of file
+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */
diff --git a/gcc/testsuite/g++.old-deja/g++.law/weak.C b/gcc/testsuite/g++.old-deja/g++.law/weak.C
index 49132ad..52444e7 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/weak.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/weak.C
@@ -11,10 +11,12 @@
std::istream x (0);
+int
main () {
x.get();
std::putc(0, 0);
std::fgets(0, 0, 0);
x.get((char*) 0, 0);
+ return 0;
}
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index f68604c..7c0e808 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,14 @@
+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * testsuite/libgomp.c++/loop-2.C: Return a value
+ for functions with non-void return type, or change type to void,
+ or add -Wno-return-type for test.
+ * testsuite/libgomp.c++/loop-4.C: Likewise.
+ * testsuite/libgomp.c++/parallel-1.C: Likewise.
+ * testsuite/libgomp.c++/shared-1.C: Likewise.
+ * testsuite/libgomp.c++/single-1.C: Likewise.
+ * testsuite/libgomp.c++/single-2.C: Likewise.
+
2017-10-31 Tom de Vries <tom@codesourcery.com>
* plugin/plugin-hsa.c (HSA_LOG): Remove semicolon after
diff --git a/libgomp/testsuite/libgomp.c++/loop-2.C b/libgomp/testsuite/libgomp.c++/loop-2.C
index ea3dc58..77144b8 100644
--- a/libgomp/testsuite/libgomp.c++/loop-2.C
+++ b/libgomp/testsuite/libgomp.c++/loop-2.C
@@ -15,6 +15,7 @@ void parloop (int *a)
a[i] = i + 3;
}
+int
main()
{
int i, a[N];
diff --git a/libgomp/testsuite/libgomp.c++/loop-4.C b/libgomp/testsuite/libgomp.c++/loop-4.C
index 731f234..a940854 100644
--- a/libgomp/testsuite/libgomp.c++/loop-4.C
+++ b/libgomp/testsuite/libgomp.c++/loop-4.C
@@ -1,5 +1,6 @@
extern "C" void abort (void);
+int
main()
{
int i, a;
diff --git a/libgomp/testsuite/libgomp.c++/parallel-1.C b/libgomp/testsuite/libgomp.c++/parallel-1.C
index 3c93147..ce338d0 100644
--- a/libgomp/testsuite/libgomp.c++/parallel-1.C
+++ b/libgomp/testsuite/libgomp.c++/parallel-1.C
@@ -8,6 +8,7 @@ foo (void)
return 10;
}
+int
main ()
{
int A = 0;
diff --git a/libgomp/testsuite/libgomp.c++/shared-1.C b/libgomp/testsuite/libgomp.c++/shared-1.C
index 334a553..2f61daa 100644
--- a/libgomp/testsuite/libgomp.c++/shared-1.C
+++ b/libgomp/testsuite/libgomp.c++/shared-1.C
@@ -53,6 +53,7 @@ parallel (int a, int b)
abort ();
}
+int
main()
{
parallel (1, 2);
diff --git a/libgomp/testsuite/libgomp.c++/single-1.C b/libgomp/testsuite/libgomp.c++/single-1.C
index e318a48..221236f 100644
--- a/libgomp/testsuite/libgomp.c++/single-1.C
+++ b/libgomp/testsuite/libgomp.c++/single-1.C
@@ -1,5 +1,6 @@
extern "C" void abort (void);
+int
main()
{
int i = 0;
diff --git a/libgomp/testsuite/libgomp.c++/single-2.C b/libgomp/testsuite/libgomp.c++/single-2.C
index c2dd228..d24b1d8 100644
--- a/libgomp/testsuite/libgomp.c++/single-2.C
+++ b/libgomp/testsuite/libgomp.c++/single-2.C
@@ -7,6 +7,7 @@ struct X
int c;
};
+int
main()
{
int i = 0;
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 70061e9..a9a19a4 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,13 @@
+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * testsuite/27_io/basic_fstream/cons/char/path.cc (main):
+ Return a value for functions with non-void return type,
+ or change type to void, or add -Wno-return-type for test.
+ * testsuite/27_io/basic_ifstream/cons/char/path.cc (main):
+ Likewise.
+ * testsuite/27_io/basic_ofstream/open/char/path.cc (main):
+ Likewise.
+
2017-11-06 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type
diff --git a/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc
index 4442c28..51337eb 100644
--- a/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_fstream/cons/char/path.cc
@@ -45,4 +45,5 @@ main()
{
test01();
test02();
+ return 0;
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc
index 24286f5..a0de4ba 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/char/path.cc
@@ -45,4 +45,5 @@ main()
{
test01();
test02();
+ return 0;
}
diff --git a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc
index a3fc0c7f..38078c9 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ofstream/open/char/path.cc
@@ -47,4 +47,5 @@ main()
{
test01();
test02();
+ return 0;
}