diff mbox series

[testsuite] Fix -Wreturn-type fallout in g++.old-deja/g++.brendan/asm-extn1.C

Message ID yddwp316r6c.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series [testsuite] Fix -Wreturn-type fallout in g++.old-deja/g++.brendan/asm-extn1.C | expand

Commit Message

Rainer Orth Nov. 8, 2017, 9:44 a.m. UTC
There's more fallout from the -Wreturn-type patch:

Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C:10:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]

Fixed as follows.  While looking at the testcase, I noticed that there's
no reason to restrict it to a particular vendor or 32-bit-default SPARC
targets, so I'm relaxing the target triplet at the same time.

Tested on sparc-sun-solaris2.11 and sparcv9-sun-solaris2.11, installed.

	Rainer
diff mbox series

Patch

# HG changeset patch
# Parent  39205c0844998afecd0cf33584b4c3d6c4b02cc9
Fix -Wreturn-type fallout in g++.old-deja/g++.brendan/asm-extn1.C

diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C b/gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C
--- a/gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/asm-extn1.C
@@ -1,4 +1,4 @@ 
-// { dg-do assemble { target sparc-sun-* } }
+// { dg-do assemble { target sparc*-*-* } }
 // { dg-options "-S" }
 // GROUPS passed asm-extension
 // This used to crash because c_expand_asm_keyword didn't know what to
@@ -7,7 +7,7 @@ 
 
 extern void traptable(void);
 
-main()
+int main()
 {
   asm("wr    %0,%%tbr" : : "r" (traptable));
 }