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 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-11-07 Rainer Orth <r...@cebitec.uni-bielefeld.de> * g++.old-deja/g++.brendan/asm-extn1.C: Accept all sparc* targets. (main): Add return type.
# 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)); }