public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite] Fix -Wreturn-type fallout in g++.old-deja/g++.brendan/asm-extn1.C
@ 2017-11-08  9:51 Rainer Orth
  0 siblings, 0 replies; only message in thread
From: Rainer Orth @ 2017-11-08  9:51 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

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  <ro@CeBiTec.Uni-Bielefeld.DE>

	* g++.old-deja/g++.brendan/asm-extn1.C: Accept all sparc* targets.
	(main): Add return type.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: testsuite-asm-extn1.patch --]
[-- Type: text/x-patch, Size: 727 bytes --]

# 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));
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-08  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  9:51 [testsuite] Fix -Wreturn-type fallout in g++.old-deja/g++.brendan/asm-extn1.C Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).