C99 testsuite readiness: Cleanup of execute tests

Message ID 87zfzl2res.fsf@oldenburg.str.redhat.com
State Unresolved
Headers
Series C99 testsuite readiness: Cleanup of execute tests |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Florian Weimer Nov. 10, 2023, 10:07 p.m. UTC
  This change updates the gcc.c-torture/execute/ to avoid obsolete
language constructs.  In the changed tests, use of the features
appears to be accidental, and updating allows the tests run with
the default compiler flags.

gcc/testsuite/

	* gcc.c-torture/execute/20000112-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/20000113-1.c (foobar): Add missing
	void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/20000314-2.c (main): Likewise.
	* gcc.c-torture/execute/20000402-1.c (main): Likewise.
	* gcc.c-torture/execute/20000403-1.c (main): Likewise.
	* gcc.c-torture/execute/20000503-1.c (main): Likewise.
	* gcc.c-torture/execute/20000605-2.c (main): Likewise.
	* gcc.c-torture/execute/20000717-1.c (main): Likewise.
	* gcc.c-torture/execute/20000717-5.c (main): Likewise.
	* gcc.c-torture/execute/20000726-1.c (main): Likewise.
	* gcc.c-torture/execute/20000914-1.c(blah): Add missing
	void types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/20001009-1.c (main): Likewise.
	* gcc.c-torture/execute/20001013-1.c (main): Likewise.
	* gcc.c-torture/execute/20001031-1.c (main): Likewise.
	* gcc.c-torture/execute/20010221-1.c (main): Likewise.
	* gcc.c-torture/execute/20010723-1.c (main): Likewise.
	* gcc.c-torture/execute/20010915-1.c (s): Call
	__builtin_strcmp instead of strcmp.
	* gcc.c-torture/execute/20010924-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/20011128-1.c (main): Likewise.
	* gcc.c-torture/execute/20020226-1.c (main): Likewise.
	* gcc.c-torture/execute/20020328-1.c (foo): Add missing
	void types.
	* gcc.c-torture/execute/20020406-1.c (DUPFFexgcd): Call
	__builtin_printf instead of printf.
	(main): Likewise.
	* gcc.c-torture/execute/20020508-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/20020508-2.c (main): Likewise.
	* gcc.c-torture/execute/20020508-3.c (main): Likewise.
	* gcc.c-torture/execute/20020611-1.c (main): Likewise.
	* gcc.c-torture/execute/20021010-2.c (main): Likewise.
	* gcc.c-torture/execute/20021113-1.c (foo): Add missing
	void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/20021120-3.c (foo): Call
	__builtin_sprintf instead of sprintf.
	* gcc.c-torture/execute/20030125-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/20030216-1.c (main): Likewise.
	* gcc.c-torture/execute/20030404-1.c (main): Likewise.
	* gcc.c-torture/execute/20030606-1.c (main): Likewise.
	Call __builtin_memset instead of memset.
	* gcc.c-torture/execute/20030828-1.c (main): Add missing int
	and void types.
	* gcc.c-torture/execute/20030828-2.c (main): Likewise.
	* gcc.c-torture/execute/20031012-1.c: Call __builtin_strlen
	instead of strlen.
	* gcc.c-torture/execute/20031211-1.c (main): Add missing int
	and void types.
	* gcc.c-torture/execute/20040319-1.c (main): Likewise.
	* gcc.c-torture/execute/20040411-1.c (sub1): Call
	__builtin_memcpy instead of memcpy.
	* gcc.c-torture/execute/20040423-1.c (sub1): Likewise.
	* gcc.c-torture/execute/20040917-1.c (main): Add missing int
	and void types.
	* gcc.c-torture/execute/20050131-1.c (main): Likewise.
	* gcc.c-torture/execute/20051113-1.c (main): Likewise.
	* gcc.c-torture/execute/20121108-1.c (main): Call
	__builtin_printf instead of printf.
	* gcc.c-torture/execute/20170401-2.c (main): Add missing int
	and void types.
	* gcc.c-torture/execute/900409-1.c (main): Likewise.
	* gcc.c-torture/execute/920202-1.c (f): Add int return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/920302-1.c (execute): Add void return
	type.
	(main): Add missing int	and void types.
	* gcc.c-torture/execute/920410-1.c (main): Likewise.
	* gcc.c-torture/execute/920501-2.c (main): Likewise.
	* gcc.c-torture/execute/920501-3.c (execute): Add void return
	type.
	(main): Add missing int	and void types.
	* gcc.c-torture/execute/920501-5.c (x): Add int return type.
	(main): Add missing int	and void types.
	* gcc.c-torture/execute/920501-6.c (main): Add int return
	type.
	* gcc.c-torture/execute/920501-8.c (main): Add missing
	int and void types.  Call __builtin_strcmp instead of strcmp.
	* gcc.c-torture/execute/920506-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/920612-2.c (main): Likewise.
	* gcc.c-torture/execute/920618-1.c (main): Likewise.
	* gcc.c-torture/execute/920625-1.c (main): Likewise.
	* gcc.c-torture/execute/920710-1.c (main): Likewise.
	* gcc.c-torture/execute/920721-1.c (main): Likewise.
	* gcc.c-torture/execute/920721-4.c (main): Likewise.
	* gcc.c-torture/execute/920726-1.c (first, second): Call
	__builtin_strlen instead of strlen.
	(main): Add missing int	and void types.  Call __builtin_strcmp
	instead of strcmp.
	* gcc.c-torture/execute/920810-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/920829-1.c (main): Likewise.
	* gcc.c-torture/execute/920908-1.c (main): Likewise.
	* gcc.c-torture/execute/920922-1.c (main): Likewise.
	* gcc.c-torture/execute/920929-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/921006-1.c (main): Likewise.  Call
	__builtin_strcmp instead of strcmp.
	* gcc.c-torture/execute/921007-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/921016-1.c (main): Likewise.
	* gcc.c-torture/execute/921019-1.c (main): Likewise.
	* gcc.c-torture/execute/921019-2.c (main): Likewise.
	* gcc.c-torture/execute/921029-1.c (main): Likewise.
	* gcc.c-torture/execute/921104-1.c (main): Likewise.
	* gcc.c-torture/execute/921112-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/921113-1.c (w, f1, f2, gitter): Add
	void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/921117-1.c (check): Call
	__builtin_strcmp instead of strcmp.
	(main): Add missing int and void types.  Call __builtin_strcpy
	instead of strcpy.
	* gcc.c-torture/execute/921123-2.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/921202-2.c (main): Likewise.
	* gcc.c-torture/execute/921204-1.c (main): Likewise.
	* gcc.c-torture/execute/921208-1.c (main): Likewise.
	* gcc.c-torture/execute/930123-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930126-1.c (main): Likewise.
	* gcc.c-torture/execute/930406-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930408-1.c (p, f): Add missing void
	types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930429-1.c (main): Likewise.
	* gcc.c-torture/execute/930603-2.c (f): Add missing void
	types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930608-1.c (main): Likewise.
	* gcc.c-torture/execute/930614-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930614-2.c (main): Likewise.
	* gcc.c-torture/execute/930622-2.c (main): Likewise.
	* gcc.c-torture/execute/930628-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/930725-1.c (main): Likewise.  Call
	__builtin_strcmp instead of strcmp.
	* gcc.c-torture/execute/930930-2.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/931002-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-10.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-11.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-12.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-13.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-14.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-2.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-3.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-4.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-5.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-6.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-7.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-8.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931004-9.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/931005-1.c (main): Likewise.
	* gcc.c-torture/execute/931110-1.c (main): Likewise.
	* gcc.c-torture/execute/931110-2.c (main): Likewise.
	* gcc.c-torture/execute/941014-1.c (main): Likewise.
	* gcc.c-torture/execute/941014-2.c (main): Likewise.
	* gcc.c-torture/execute/941015-1.c (main): Likewise.
	* gcc.c-torture/execute/941021-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/941025-1.c (main): Likewise.
	* gcc.c-torture/execute/941031-1.c (main): Likewise.
	* gcc.c-torture/execute/950221-1.c (g2): Add int return type.
	(f): Add missing void types.  Call __builtin_strcpy instead
	of strcpy.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/950426-2.c (main): Likewise.
	* gcc.c-torture/execute/950503-1.c (main): Likewise.
	* gcc.c-torture/execute/950511-1.c (main): Likewise.
	* gcc.c-torture/execute/950607-1.c (main): Likewise.
	* gcc.c-torture/execute/950607-2.c (main): Likewise.
	* gcc.c-torture/execute/950612-1.c (main): Likewise.
	* gcc.c-torture/execute/950628-1.c (main): Likewise.
	* gcc.c-torture/execute/950704-1.c (main): Likewise.
	* gcc.c-torture/execute/950706-1.c (main): Likewise.
	* gcc.c-torture/execute/950710-1.c (main): Likewise.
	* gcc.c-torture/execute/950714-1.c (main): Likewise.
	* gcc.c-torture/execute/950809-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/950906-1.c (g, f): Add void return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/950915-1.c (main): Likewise.
	* gcc.c-torture/execute/950929-1.c (main): Likewise.
	* gcc.c-torture/execute/951003-1.c (f): Add missing int
	parameter type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/951115-1.c (g, f): Add void return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/951204-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960116-1.c (p): Add int return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960117-1.c (main): Likewise.
	* gcc.c-torture/execute/960209-1.c (main): Likewise.
	* gcc.c-torture/execute/960215-1.c (main): Likewise.
	* gcc.c-torture/execute/960219-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960301-1.c (main): Likewise.
	* gcc.c-torture/execute/960302-1.c (foo, main): Add missing
	int and void types.
	* gcc.c-torture/execute/960311-1.c (main): Likewise.
	* gcc.c-torture/execute/960311-2.c (main): Likewise.
	* gcc.c-torture/execute/960311-3.c (main): Likewise.
	* gcc.c-torture/execute/960312-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960317-1.c (main): Likewise.
	* gcc.c-torture/execute/960321-1.c (main): Likewise.
	* gcc.c-torture/execute/960326-1.c (main): Likewise.
	* gcc.c-torture/execute/960327-1.c (g, main): Add missing
	int and void types.
	(f): Add missing void types.
	* gcc.c-torture/execute/960405-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/960416-1.c (main): Likewise.
	* gcc.c-torture/execute/960419-1.c (main): Likewise.
	* gcc.c-torture/execute/960419-2.c (main): Likewise.
	* gcc.c-torture/execute/960512-1.c (main): Likewise.
	* gcc.c-torture/execute/960513-1.c (main): Likewise.
	* gcc.c-torture/execute/960521-1.c (f): Add missing void
	types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960608-1.c (f): Add int return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/960801-1.c (main): Likewise.
	* gcc.c-torture/execute/960802-1.c (main): Likewise.
	* gcc.c-torture/execute/960909-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/961004-1.c (main): Likewise.
	* gcc.c-torture/execute/961017-1.c (main): Likewise.
	* gcc.c-torture/execute/961017-2.c (main): Likewise.
	* gcc.c-torture/execute/961026-1.c (main): Likewise.
	* gcc.c-torture/execute/961122-1.c (addhi, subhi): Add void
	return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/961122-2.c (main): Likewise.
	* gcc.c-torture/execute/961125-1.c (main): Likewise.
	* gcc.c-torture/execute/961206-1.c (main): Likewise.
	* gcc.c-torture/execute/961213-1.c (main): Likewise.
	* gcc.c-torture/execute/970214-1.c (main): Likewise.
	* gcc.c-torture/execute/970214-2.c (main): Likewise.
	* gcc.c-torture/execute/970217-1.c (sub): Add int return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/970923-1.c (main): Likewise.
	* gcc.c-torture/execute/980223.c (main): Likewise.
	* gcc.c-torture/execute/980506-1.c (main): Likewise.
	* gcc.c-torture/execute/980506-2.c (main): Likewise.
	* gcc.c-torture/execute/980506-3.c (build_lookup): Call
	__builtin_strlen instead of strlen and __builtin_memset
	instead of memset.
	* gcc.c-torture/execute/980526-3.c (main): Likewise.
	* gcc.c-torture/execute/980602-1.c (main): Likewise.
	* gcc.c-torture/execute/980604-1.c (main): Likewise.
	* gcc.c-torture/execute/980605-1.c (dummy): Add missing int
	parameter type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/980701-1.c (ns_name_skip): Add missing
	int return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/980709-1.c (main): Likewise.
	* gcc.c-torture/execute/990117-1.c (main): Likewise.
	* gcc.c-torture/execute/990127-1.c (main): Likewise.
	* gcc.c-torture/execute/990128-1.c (main): Likewise.
	* gcc.c-torture/execute/990130-1.c (main): Likewise.
	* gcc.c-torture/execute/990324-1.c (main): Likewise.
	* gcc.c-torture/execute/990524-1.c (main): Likewise.
	* gcc.c-torture/execute/990531-1.c (main): Likewise.
	* gcc.c-torture/execute/990628-1.c (fetch, load_data): Call
	__builtin_memset instead of memset.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/991019-1.c (main): Likewise.
	* gcc.c-torture/execute/991023-1.c (foo, main): Likewise.
	* gcc.c-torture/execute/991112-1.c (isprint): Declare.
	* gcc.c-torture/execute/991118-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/alias-1.c (ptr2): Add cast to float *
	in initializer.
	(typepun): Add missing void types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/alias-2.c (main): Likewise.
	* gcc.c-torture/execute/alias-3.c (inc): Add missing
	void types.
	* gcc.c-torture/execute/alias-4.c (main): Add missing int
	return type.
	* gcc.c-torture/execute/arith-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/arith-rand-ll.c (main): Likewise.
	* gcc.c-torture/execute/arith-rand.c (main): Likewise.
	* gcc.c-torture/execute/bf-layout-1.c (main): Likewise.
	* gcc.c-torture/execute/bf-pack-1.c (foo): Add missing
	void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/bf-sign-1.c (main): Likewise.
	* gcc.c-torture/execute/bf-sign-2.c (main): Likewise.
	* gcc.c-torture/execute/bf64-1.c (main): Likewise.
	* gcc.c-torture/execute/builtin-prefetch-2.c (stat_int_arr):
	Add missing int array element type.
	* gcc.c-torture/execute/builtin-prefetch-3.c (stat_int_arr):
	Likewise.
	* gcc.c-torture/execute/cbrt.c (main): Add missing int and
	void types.
	* gcc.c-torture/execute/complex-1.c (main): Likewise.
	* gcc.c-torture/execute/complex-2.c (main): Likewise.
	* gcc.c-torture/execute/complex-3.c (main): Likewise.
	* gcc.c-torture/execute/complex-4.c (main): Likewise.
	* gcc.c-torture/execute/complex-5.c (main): Likewise.
	* gcc.c-torture/execute/compndlit-1.c (main): Likewise.
	* gcc.c-torture/execute/conversion.c (test_integer_to_float)
	(test_longlong_integer_to_float, test_float_to_integer)
	(test_float_to_longlong_integer): Add missing void return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/cvt-1.c (main): Likewise.
	* gcc.c-torture/execute/divconst-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/divconst-2.c (main): Likewise.
	* gcc.c-torture/execute/divconst-3.c (main): Likewise.
	* gcc.c-torture/execute/enum-1.c (main): Likewise.
	* gcc.c-torture/execute/func-ptr-1.c (main): Likewise.
	* gcc.c-torture/execute/ieee/20011123-1.c (main): Likewise.
	* gcc.c-torture/execute/ieee/920518-1.c (main): Likewise.
	* gcc.c-torture/execute/ieee/920810-1.c (main): Likewise.
	Call __builtin_strcmp instead of strcmp.
	* gcc.c-torture/execute/ieee/930529-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/ieee/fp-cmp-1.c (main): Likewise.
	* gcc.c-torture/execute/ieee/fp-cmp-2.c (main): Likewise.
	* gcc.c-torture/execute/ieee/fp-cmp-3.c (main): Likewise.
	* gcc.c-torture/execute/ieee/fp-cmp-6.c (main): Likewise.
	* gcc.c-torture/execute/ieee/fp-cmp-9.c (main): Likewise.
	* gcc.c-torture/execute/ieee/minuszero.c (main): Likewise.
	* gcc.c-torture/execute/ieee/mzero2.c (expect): Call
	__builtin_memcmp instead of memcmp.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/ieee/mzero3.c (main): Likewise.
	(expectd, expectf): Call __builtin_memcmp instead of memcmp.
	* gcc.c-torture/execute/ieee/mzero5.c (negzero_check):
	Likewise.
	* gcc.c-torture/execute/ieee/rbug.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/index-1.c (main): Likewise.
	* gcc.c-torture/execute/loop-1.c (main): Likewise.
	* gcc.c-torture/execute/loop-2b.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/loop-6.c (main): Likewise.
	* gcc.c-torture/execute/loop-7.c (main): Likewise.
	* gcc.c-torture/execute/lto-tbaa-1.c (use_a, set_b, use_c):
	Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/memcpy-1.c (main): Likewise.
	* gcc.c-torture/execute/memcpy-2.c (main): Likewise.
	* gcc.c-torture/execute/memcpy-bi.c (main): Likewise.
	* gcc.c-torture/execute/memset-1.c (main): Likewise.
	* gcc.c-torture/execute/memset-2.c: Include <string.h>.
	* gcc.c-torture/execute/memset-3.c: Likewise.
	* gcc.c-torture/execute/nest-stdar-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/nestfunc-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/packed-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/pr15262-1.c (main): Likewise.  Call
	__builtin_malloc instead of malloc.
	* gcc.c-torture/execute/pr15262-2.c (foo): Add int return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/pr15262.c (main): Likewise.
	* gcc.c-torture/execute/pr17252.c (main): Likewise.
	* gcc.c-torture/execute/pr21331.c (main): Likewise.
	* gcc.c-torture/execute/pr34176.c (foo): Add missing int
	type to definition of foo.
	* gcc.c-torture/execute/pr42231.c (max): Add missing int type
	to definition.
	* gcc.c-torture/execute/pr42614.c (expect_func): Call
	__builtin_abs instead of abs.
	* gcc.c-torture/execute/pr54937.c (t): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/ptr-arith-1.c (main): Likewise.
	* gcc.c-torture/execute/regstack-1.c (main): Likewise.
	* gcc.c-torture/execute/scope-1.c (f): Add missing void types.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/simd-5.c (main): Call __builtin_memcmp
	instead of memcmp.
	* gcc.c-torture/execute/strcmp-1.c (main): Add missing
	int and void types.
	* gcc.c-torture/execute/strcpy-1.c (main): Likewise.
	* gcc.c-torture/execute/strct-pack-1.c (main): Likewise.
	* gcc.c-torture/execute/strct-pack-2.c (main): Likewise.
	* gcc.c-torture/execute/strct-pack-4.c (main): Likewise.
	* gcc.c-torture/execute/strct-stdarg-1.c (f): Add void return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/strct-varg-1.c (f): Add void return
	type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/strlen-1.c (main): Likewise.
	* gcc.c-torture/execute/strncmp-1.c (main): Likewise.
	* gcc.c-torture/execute/struct-ini-1.c (main): Likewise.
	* gcc.c-torture/execute/struct-ini-2.c (main): Likewise.
	* gcc.c-torture/execute/struct-ini-3.c (main): Likewise.
	* gcc.c-torture/execute/struct-ini-4.c (main): Likewise.
	* gcc.c-torture/execute/struct-ret-1.c (main): Likewise.
	* gcc.c-torture/execute/struct-ret-2.c (main): Likewise.
	* gcc.c-torture/execute/va-arg-1.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/va-arg-10.c (main): Likewise.
	* gcc.c-torture/execute/va-arg-2.c (main): Likewise.
	* gcc.c-torture/execute/va-arg-4.c (main): Likewise.
	* gcc.c-torture/execute/va-arg-5.c (va_double)
	(va_long_double): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/va-arg-6.c (f): Add void return type.
	(main): Add missing int and void types.
	* gcc.c-torture/execute/va-arg-9.c (main): Likewise.
	* gcc.c-torture/execute/widechar-1.c (main): Likewise.

---
 gcc/testsuite/gcc.c-torture/execute/20000112-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000113-1.c         | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/20000314-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000402-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20000403-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000503-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000605-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000717-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000717-5.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000726-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20000914-1.c         | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/20001009-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20001013-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20001031-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20010221-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20010723-1.c         | 4 ++--
 gcc/testsuite/gcc.c-torture/execute/20010915-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20010924-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20011128-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20020226-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20020328-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20020406-1.c         | 4 ++--
 gcc/testsuite/gcc.c-torture/execute/20020508-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20020508-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20020508-3.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20020611-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20021010-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20021113-1.c         | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/20021120-3.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20030125-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20030216-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20030404-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20030606-1.c         | 7 ++++---
 gcc/testsuite/gcc.c-torture/execute/20030828-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20030828-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20031012-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20031211-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20040319-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20040411-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20040423-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20040917-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20050131-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/20051113-1.c         | 2 +-
 gcc/testsuite/gcc.c-torture/execute/20121108-1.c         | 6 +++---
 gcc/testsuite/gcc.c-torture/execute/20170401-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/900409-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920202-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/920302-1.c           | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/920410-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920501-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920501-3.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/920501-5.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/920501-6.c           | 1 +
 gcc/testsuite/gcc.c-torture/execute/920501-8.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/920506-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920612-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920618-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920625-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920710-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920721-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920721-4.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920726-1.c           | 9 +++++----
 gcc/testsuite/gcc.c-torture/execute/920810-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920829-1.c           | 2 +-
 gcc/testsuite/gcc.c-torture/execute/920908-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920922-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/920929-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/921006-1.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/921007-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921016-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921019-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921019-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921029-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921104-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921112-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/921113-1.c           | 8 ++++++--
 gcc/testsuite/gcc.c-torture/execute/921117-1.c           | 7 ++++---
 gcc/testsuite/gcc.c-torture/execute/921123-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921202-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921204-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/921208-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930123-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/930126-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930406-1.c           | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/930408-1.c           | 9 ++++++---
 gcc/testsuite/gcc.c-torture/execute/930429-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930603-2.c           | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/930608-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930614-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/930614-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930622-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/930628-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/930725-1.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/930930-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/931002-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-10.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-11.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-12.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-13.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-14.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-2.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-3.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-4.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-5.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-6.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-7.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-8.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931004-9.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/931005-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/931110-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/931110-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/941014-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/941014-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/941015-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/941021-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/941025-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/941031-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950221-1.c           | 9 ++++++---
 gcc/testsuite/gcc.c-torture/execute/950426-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950503-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950511-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950607-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950607-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950612-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950628-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950704-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950706-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950710-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950714-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950809-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/950906-1.c           | 5 ++++-
 gcc/testsuite/gcc.c-torture/execute/950915-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/950929-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/951003-1.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/951115-1.c           | 5 ++++-
 gcc/testsuite/gcc.c-torture/execute/951204-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/960116-1.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/960117-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960209-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960215-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960219-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/960301-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960302-1.c           | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/960311-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960311-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960311-3.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960312-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/960317-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960321-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960326-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960327-1.c           | 9 ++++++---
 gcc/testsuite/gcc.c-torture/execute/960405-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960416-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960419-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960419-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960512-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960513-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960521-1.c           | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/960608-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/960801-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960802-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/960909-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/961004-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961017-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961017-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961026-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961122-1.c           | 5 ++++-
 gcc/testsuite/gcc.c-torture/execute/961122-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961125-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961206-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/961213-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/970214-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/970214-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/970217-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/970923-1.c           | 4 ++--
 gcc/testsuite/gcc.c-torture/execute/980223.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980506-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980506-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980506-3.c           | 4 ++--
 gcc/testsuite/gcc.c-torture/execute/980526-3.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980602-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980604-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/980605-1.c           | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/980701-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/980709-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990117-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990127-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990128-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990130-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990324-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990524-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990531-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/990628-1.c           | 8 ++++----
 gcc/testsuite/gcc.c-torture/execute/991019-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/991023-1.c           | 8 +++++---
 gcc/testsuite/gcc.c-torture/execute/991112-1.c           | 1 +
 gcc/testsuite/gcc.c-torture/execute/991118-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/alias-1.c            | 8 +++++---
 gcc/testsuite/gcc.c-torture/execute/alias-2.c            | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/alias-3.c            | 2 +-
 gcc/testsuite/gcc.c-torture/execute/alias-4.c            | 1 +
 gcc/testsuite/gcc.c-torture/execute/arith-1.c            | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/arith-rand.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c        | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/bf64-1.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c | 2 +-
 gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c | 2 +-
 gcc/testsuite/gcc.c-torture/execute/cbrt.c               | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/complex-1.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/complex-2.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/complex-3.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/complex-4.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/complex-5.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/compndlit-1.c        | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/conversion.c         | 7 ++++++-
 gcc/testsuite/gcc.c-torture/execute/cvt-1.c              | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/divconst-1.c         | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/divconst-2.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/divconst-3.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/enum-1.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c    | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c      | 2 +-
 gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-9.c      | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c     | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c        | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c        | 9 ++++++---
 gcc/testsuite/gcc.c-torture/execute/ieee/mzero5.c        | 2 +-
 gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/index-1.c            | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/loop-1.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/loop-2b.c            | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/loop-6.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/loop-7.c             | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c         | 6 +++++-
 gcc/testsuite/gcc.c-torture/execute/memcpy-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/memcpy-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/memset-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/memset-2.c           | 2 ++
 gcc/testsuite/gcc.c-torture/execute/memset-3.c           | 2 ++
 gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c         | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/packed-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/pr15262-1.c          | 5 +++--
 gcc/testsuite/gcc.c-torture/execute/pr15262-2.c          | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/pr15262.c            | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/pr17252.c            | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/pr21331.c            | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/pr34176.c            | 2 +-
 gcc/testsuite/gcc.c-torture/execute/pr42231.c            | 2 +-
 gcc/testsuite/gcc.c-torture/execute/pr42614.c            | 4 ++--
 gcc/testsuite/gcc.c-torture/execute/pr54937.c            | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c        | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/regstack-1.c         | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/scope-1.c            | 6 ++++--
 gcc/testsuite/gcc.c-torture/execute/simd-5.c             | 8 ++++----
 gcc/testsuite/gcc.c-torture/execute/strcmp-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strcpy-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c     | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c       | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/strlen-1.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/strncmp-1.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c       | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-1.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-10.c          | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-2.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-4.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-5.c           | 5 ++++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-6.c           | 4 +++-
 gcc/testsuite/gcc.c-torture/execute/va-arg-9.c           | 3 ++-
 gcc/testsuite/gcc.c-torture/execute/widechar-1.c         | 3 ++-
 291 files changed, 682 insertions(+), 337 deletions(-)


base-commit: 8af7c4debcf664986ca510c74139b5acb6f50a1c
  

Comments

Jakub Jelinek Nov. 16, 2023, 11:07 a.m. UTC | #1
On Thu, Nov 16, 2023 at 11:58:42AM +0100, Thomas Schwinge wrote:
> > -main ()
> > +void
> > +main (int)
> >  {
> >    struct tiny x[3];
> >    x[0].c = 10;
> 
> The nvptx back end doesn't like that one:
> 
>     PASS: gcc.c-torture/execute/931004-13.c   -O0  (test for excess errors)
>     [-PASS:-]{+FAIL:+} gcc.c-torture/execute/931004-13.c   -O0  execution test
>     [...]
> 
>     error   : Prototype doesn't match for 'main' [...]
> 
> I'll add handling for this case in (I suppose)
> 'gcc/config/nvptx/nvptx.cc:write_fn_proto_1' if that indeed is a
> conforming declaration of 'main', but is it really?

C23 says
It shall be defined with a return type of int and with no parameters:
int main(void) { /* ... */ }
or with two parameters (referred to here as argc and argv, though any names may be used, as they
are local to the function in which they are declared):
int main(int argc, char *argv[]) { /* ... */ }
or equivalent 10) ; or in some other implementation-defined manner.

10) Thus, int can be replaced by a typedef name defined as int, or the type of argv can be written
as char ** argv, or the return type may be specified by typeof(1), and so on.

And then there is
If the return type of the main function is a type compatible with int, a return from the initial call
to the main function is equivalent to calling the exit function with the value returned by the main
function as its argument;11) reaching the } that terminates the main function returns a value of 0. If
the return type is not compatible with int, the termination status returned to the host environment
is unspecified.

So, I guess void main (int) could be ok in some implementations, but I don't
think that is the case of our.  Florian, didn't you mean
int
main (void)
or
int
main ()
instead?

Note, I'm using
int
main ()
{
...
}
in most tests and I hope it should be fine both in the pre-C23 way and in
C23.

	Jakub
  
Florian Weimer Nov. 16, 2023, 11:10 a.m. UTC | #2
* Thomas Schwinge:

> Hi Florian!
>
> Thanks for all your ongoing clean-up work!
>
> On 2023-11-10T23:07:55+0100, Florian Weimer <fweimer@redhat.com> wrote:
>> This change updates the gcc.c-torture/execute/ to avoid obsolete
>> language constructs.  In the changed tests, use of the features
>> appears to be accidental, and updating allows the tests run with
>> the default compiler flags.
>
>> --- a/gcc/testsuite/gcc.c-torture/execute/931004-13.c
>> +++ b/gcc/testsuite/gcc.c-torture/execute/931004-13.c
>
>> @@ -42,7 +43,8 @@ f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
>>      abort ();
>>  }
>>
>> -main ()
>> +void
>> +main (int)
>>  {
>>    struct tiny x[3];
>>    x[0].c = 10;
>
> The nvptx back end doesn't like that one:
>
>     PASS: gcc.c-torture/execute/931004-13.c   -O0  (test for excess errors)
>     [-PASS:-]{+FAIL:+} gcc.c-torture/execute/931004-13.c   -O0  execution test
>     [...]
>
>     error   : Prototype doesn't match for 'main' [...]
>
> I'll add handling for this case in (I suppose)
> 'gcc/config/nvptx/nvptx.cc:write_fn_proto_1' if that indeed is a
> conforming declaration of 'main', but is it really?

Sorry about that.  My change was invalid, I swapped int/void by
accident.  Too many edits in too short a period.  I will fix it as
obvious.

Thanks,
Florian
  
Florian Weimer Nov. 16, 2023, 11:47 a.m. UTC | #3
* Jakub Jelinek:

> So, I guess void main (int) could be ok in some implementations, but I don't
> think that is the case of our.  Florian, didn't you mean
> int
> main (void)
> or
> int
> main ()
> instead?

Exactly, it was a silly mistake.

> Note, I'm using
> int
> main ()
> {
> ...
> }
> in most tests and I hope it should be fine both in the pre-C23 way and in
> C23.

It should remain acceptable.  Some people push for warnings on
int main () { … }, which is why I added the void if I was adding
the return type anyway.  But it seems that warning about that
seems unlikely for GCC at least.

Thanks,
Florian
  

Patch

diff --git a/gcc/testsuite/gcc.c-torture/execute/20000112-1.c b/gcc/testsuite/gcc.c-torture/execute/20000112-1.c
index 7668821f6d0..023cca9418a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000112-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000112-1.c
@@ -13,7 +13,8 @@  special_format (fmt)
           || strchr (fmt, 'n') != 0);
 }
 
-main()
+int
+main(void)
 {
   if (special_format ("ee"))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000113-1.c b/gcc/testsuite/gcc.c-torture/execute/20000113-1.c
index 2b1d8683cc2..cf4dd26690f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000113-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000113-1.c
@@ -6,7 +6,8 @@  struct x {
   unsigned x2:2;
   unsigned x3:3;
 };
-   
+
+void
 foobar (int x, int y, int z)
 {
   struct x a = {x, y, z};
@@ -19,7 +20,8 @@  foobar (int x, int y, int z)
   exit (0);
 }
 
-main()
+int
+main(void)
 {
   foobar (1, 2, 3);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000314-2.c b/gcc/testsuite/gcc.c-torture/execute/20000314-2.c
index bd6c33ede88..163bc73e129 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000314-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000314-2.c
@@ -15,7 +15,8 @@  uint64 getmask(void)
       return 0;
 }
 
-main()
+int
+main(void)
 {
     uint64 f = getmask();
     if (sizeof (long long) == 8
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000402-1.c b/gcc/testsuite/gcc.c-torture/execute/20000402-1.c
index 13952e57334..b51a7ba815a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000402-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000402-1.c
@@ -16,7 +16,7 @@  typedef unsigned long ull;
 
 void checkit(int);
 
-main () {
+int main (void) {
     const ull a = 0x1400000000ULL;
     const ull b = 0x80000000ULL;
     const ull c = a/b;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000403-1.c b/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
index 2c7e523299a..d780ab99ade 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
@@ -7,7 +7,8 @@  int seqgt (unsigned long a, unsigned short win, unsigned long b);
 
 int seqgt2 (unsigned long a, unsigned short win, unsigned long b);
 
-main()
+int
+main(void)
 {
   if (! seqgt (*aa, 0x1000, *bb) || ! seqgt2 (*aa, 0x1000, *bb))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000503-1.c b/gcc/testsuite/gcc.c-torture/execute/20000503-1.c
index f3082e34aea..d1c096fb38b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000503-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000503-1.c
@@ -7,7 +7,8 @@  sub (int a)
   return ((0 > a - 2) ? 0 : a - 2) * sizeof (long);
 }
 
-main ()
+int
+main (void)
 {
   if (sub (0) != 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000605-2.c b/gcc/testsuite/gcc.c-torture/execute/20000605-2.c
index 49288aab3a8..fc84d377ad5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000605-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000605-2.c
@@ -11,7 +11,8 @@  void f1(struct F *x, struct F *y)
       abort ();
 }
 
-main()
+int
+main(void)
 {
   struct F x, y;
   x.i = 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000717-1.c b/gcc/testsuite/gcc.c-torture/execute/20000717-1.c
index 04ab823668c..dd18a12a5ba 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000717-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000717-1.c
@@ -16,7 +16,8 @@  foo (trio t, int i)
   return bar (i, t);
 }
 
-main ()
+int
+main (void)
 {
   trio t = { 1, 2, 3 };
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000717-5.c b/gcc/testsuite/gcc.c-torture/execute/20000717-5.c
index 2fd08e76960..f20ccfbd23a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000717-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000717-5.c
@@ -17,7 +17,8 @@  foo (trio t, int i, int j, int k)
   return bar (i, j, k, t);
 }
 
-main ()
+int
+main (void)
 {
   trio t = { 1, 2, 3 };
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000726-1.c b/gcc/testsuite/gcc.c-torture/execute/20000726-1.c
index ac107ad96a5..c604c2a6521 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000726-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000726-1.c
@@ -13,7 +13,8 @@  struct adjust_template
 
 static struct adjust_template adjust = {0, 0, 1, 1};
 
-main ()
+int
+main (void)
 {
   short x = 1, y = 1;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000914-1.c b/gcc/testsuite/gcc.c-torture/execute/20000914-1.c
index b8c58ec370c..8d3e7fe478a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20000914-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20000914-1.c
@@ -269,8 +269,9 @@  RVALUE_CONV,
   LAST_CPLUS_TREE_CODE
 };
 
-blah(){}
+void blah(void){}
 
+void
 convert_like_real (convs)
      tree convs;
 {
@@ -284,7 +285,8 @@  convert_like_real (convs)
    abort ();
 }
 
-main()
+int
+main(void)
 {
   tree convs = (void *)malloc (sizeof (struct tree_common));;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001009-1.c b/gcc/testsuite/gcc.c-torture/execute/20001009-1.c
index 4a3cbeb9baa..1a7975798c4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20001009-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20001009-1.c
@@ -1,6 +1,7 @@ 
 void abort(void);
 int a,b;
-main()
+int
+main(void)
 {
   int c=-2;
   int d=0xfe;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001013-1.c b/gcc/testsuite/gcc.c-torture/execute/20001013-1.c
index a41a19e2461..be5349a2de9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20001013-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20001013-1.c
@@ -12,7 +12,7 @@  int foo(struct x *p, int y)
   return 0;
 }
 
-main()
+int main(void)
 {
   if (foo (&z, 10))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001031-1.c b/gcc/testsuite/gcc.c-torture/execute/20001031-1.c
index a2a6c830a21..cd041a5fcf3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20001031-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20001031-1.c
@@ -27,7 +27,8 @@  long long t4 (void)
   return i;
 }
 
-main ()
+int
+main (void)
 {
   if (t2 () != 4096)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010221-1.c b/gcc/testsuite/gcc.c-torture/execute/20010221-1.c
index a2abfadba3a..b82108bda53 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010221-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010221-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int n = 2;
 
-main ()
+int
+main (void)
 {
   int i, x = 45;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010723-1.c b/gcc/testsuite/gcc.c-torture/execute/20010723-1.c
index d29cb6bfb37..abb79e5f85c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010723-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010723-1.c
@@ -10,8 +10,8 @@  test ()
   return giv;
 }
 
-
-main()
+int
+main(void)
 {
   if (test () != 8)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010915-1.c b/gcc/testsuite/gcc.c-torture/execute/20010915-1.c
index 27c5fd39aa1..2c0940d91df 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010915-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010915-1.c
@@ -55,7 +55,7 @@  int x (int argc, char **argv)
 char *m (char *x) { abort (); }
 char *s (char *v, char **pp)
 {
-  if (strcmp (v, "a") != 0 || check++ > 1)
+  if (__builtin_strcmp (v, "a") != 0 || check++ > 1)
     abort ();
   *pp = v+1;
   return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010924-1.c b/gcc/testsuite/gcc.c-torture/execute/20010924-1.c
index 854246847bf..56206b01fa6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20010924-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20010924-1.c
@@ -37,7 +37,8 @@  struct {
   { 'e', 'b' }
 };
 
-main()
+int
+main(void)
 {
   if (a1.a1c != '4')
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20011128-1.c b/gcc/testsuite/gcc.c-torture/execute/20011128-1.c
index 24a2b4bdbcf..2901e928f5a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20011128-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20011128-1.c
@@ -1,6 +1,7 @@ 
 void exit (int);
 
-main()
+int
+main(void)
 {
   char blah[33] = "01234567890123456789";
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020226-1.c b/gcc/testsuite/gcc.c-torture/execute/20020226-1.c
index 2a6459f3090..5be2c1d3360 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020226-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020226-1.c
@@ -29,7 +29,8 @@  unsigned long long ull = LL_VALUE;
 int shift1 = SHIFT1;
 int shift2 = SHIFT2;
 
-main ()
+int
+main (void)
 {
   if (ROR (uc, shift1) != ROR (CHAR_VALUE, SHIFT1))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020328-1.c b/gcc/testsuite/gcc.c-torture/execute/20020328-1.c
index f32fdbf19f9..3ce6d9a6809 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020328-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020328-1.c
@@ -3,7 +3,7 @@  void exit (int);
 
 int b = 0;
 
-func () { }
+void func (void) { }
 
 void
 testit(int x)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020406-1.c b/gcc/testsuite/gcc.c-torture/execute/20020406-1.c
index bb5d4980220..b03a4f96b88 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020406-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020406-1.c
@@ -65,7 +65,7 @@  DUPFF DUPFFexgcd(DUPFF *fcofac, DUPFF *gcofac, const DUPFF f, const DUPFF g)
   FFelem q, lcu, lcvrecip, p;
   int df, dg, du, dv;
 
-  printf("DUPFFexgcd called on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g));
+  __builtin_printf("DUPFFexgcd called on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g));
   if (DUPFFdeg(f) < DUPFFdeg(g)) return DUPFFexgcd(gcofac, fcofac, g, f);  /*** BUG IN THIS LINE ***/
   if (DUPFFdeg(f) != 2 || DUPFFdeg(g) != 1) abort();
   if (f->coeffs[0] == 0) return f;
@@ -121,7 +121,7 @@  int main()
   f = DUPFFnew(1); f->coeffs[1] = 1; f->deg = 1;
   g = DUPFFnew(2); g->coeffs[2] = 1; g->deg = 2;
 
-  printf("calling DUPFFexgcd on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g)) ;
+  __builtin_printf("calling DUPFFexgcd on degrees %d and %d\n", DUPFFdeg(f), DUPFFdeg(g)) ;
   h = DUPFFexgcd(&cf, &cg, f, g);
   return 0;
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020508-1.c b/gcc/testsuite/gcc.c-torture/execute/20020508-1.c
index 0de335546ee..6a28eb6fd6b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020508-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020508-1.c
@@ -29,7 +29,8 @@  unsigned long long ull = LL_VALUE;
 int shift1 = SHIFT1;
 int shift2 = SHIFT2;
 
-main ()
+int
+main (void)
 {
   if (ROR (uc, shift1) != ROR (CHAR_VALUE, SHIFT1))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020508-2.c b/gcc/testsuite/gcc.c-torture/execute/20020508-2.c
index 7e3c7525b34..c4539bd7d07 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020508-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020508-2.c
@@ -27,7 +27,8 @@  long long ll = LL_VALUE;
 int shift1 = SHIFT1;
 int shift2 = SHIFT2;
 
-main ()
+int
+main (void)
 {
   if (ROR (c, shift1) != ROR (CHAR_VALUE, SHIFT1))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020508-3.c b/gcc/testsuite/gcc.c-torture/execute/20020508-3.c
index 1583ece57c4..58e15ed40a7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020508-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020508-3.c
@@ -27,7 +27,8 @@  long long ll = LL_VALUE;
 int shift1 = SHIFT1;
 int shift2 = SHIFT2;
 
-main ()
+int
+main (void)
 {
   if (ROR (c, shift1) != ROR (CHAR_VALUE, SHIFT1))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020611-1.c b/gcc/testsuite/gcc.c-torture/execute/20020611-1.c
index 92cf6fb8004..152ebd1de3c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020611-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020611-1.c
@@ -26,7 +26,8 @@  void x ()
 
 unsigned int n = 30;
 
-main ()
+int
+main (void)
 {
   x ();
   if (p != 1 || k != 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021010-2.c b/gcc/testsuite/gcc.c-torture/execute/20021010-2.c
index 425a8f6e4c8..33468ecfb5c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20021010-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20021010-2.c
@@ -18,7 +18,8 @@  unsigned int *global_vramPtr = (unsigned int *)0xa000;
 IOGBounds global_bounds = { 100, 150, 100, 150 };
 IOGBounds global_saveRect = { 75, 175, 75, 175 };
 
-main()
+int
+main(void)
 {
   unsigned int *vramPtr;
   int width;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021113-1.c b/gcc/testsuite/gcc.c-torture/execute/20021113-1.c
index d87235ffea1..ef64525c819 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20021113-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20021113-1.c
@@ -6,14 +6,16 @@ 
 void abort (void);
 void exit (int);
 
+void
 foo (int *p)
 {
   *p = 10;
 }
 
-main()
+int
+main(void)
 {
-  int *ptr = alloca (sizeof (int));
+  int *ptr = __builtin_alloca (sizeof (int));
   *ptr = 5;
   foo (ptr);
   if (*ptr == 5)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20021120-3.c b/gcc/testsuite/gcc.c-torture/execute/20021120-3.c
index c9320c57531..d191e2ba16d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20021120-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20021120-3.c
@@ -15,7 +15,7 @@  unsigned int foo (char *c, unsigned int x, unsigned int y)
 {
   register unsigned int z LOC;
 
-  sprintf (c, "%d", x / y);
+  __builtin_sprintf (c, "%d", x / y);
   z = x + 1;
   return z / (y + 1);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
index 2255d80d0d5..1c2ae1724dc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
@@ -19,7 +19,8 @@  q1(float a)
 {
 	return floor(a);
 }
-main()
+int
+main(void)
 {
 #ifdef __OPTIMIZE__
 	if (t(0)!=0)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030216-1.c b/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
index 0256ae39ebb..c0484a80bae 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030216-1.c
@@ -5,7 +5,8 @@ 
 
 void link_error (void);
 const double one=1.0;
-main ()
+int
+main (void)
 {
 #ifdef __OPTIMIZE__
   if ((int) one != 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030404-1.c b/gcc/testsuite/gcc.c-torture/execute/20030404-1.c
index a1463c1070a..e0d2c8a70fc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030404-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030404-1.c
@@ -4,7 +4,8 @@ 
    This ended up causing CCP to think that 'k' was the constant '1'.  */
 void abort (void);
 
-main()
+int
+main(void)
 {
   int i, j, k;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030606-1.c b/gcc/testsuite/gcc.c-torture/execute/20030606-1.c
index e1c12d18e49..edcbc8ce965 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030606-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030606-1.c
@@ -11,16 +11,17 @@  int * foo (int *x, int b)
   return x;
 }
 
-main()
+int
+main(void)
 {
   int a[5];
 
-  memset (a, 1, sizeof (a));
+  __builtin_memset (a, 1, sizeof (a));
 
   if (foo(a, 0) - a != 1 || a[0] != 55 || a[1] != a[4])
     abort();
 
-  memset (a, 1, sizeof (a));
+  __builtin_memset (a, 1, sizeof (a));
 
   if (foo(a, 2) - a != 2 || a[0] != 55 || a[1] != 2)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030828-1.c b/gcc/testsuite/gcc.c-torture/execute/20030828-1.c
index 15408c30d24..08af4e2ad4b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030828-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030828-1.c
@@ -8,7 +8,8 @@  int bar (void)
   return *p + 1;
 }
 
-main ()
+int
+main (void)
 {
   /* Variable 'i' is never used but it's aliased to a global pointer.  The
      alias analyzer was not considering that 'i' may be used in the call to
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030828-2.c b/gcc/testsuite/gcc.c-torture/execute/20030828-2.c
index 7828a7d31c3..e3cbcb8ad24 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030828-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030828-2.c
@@ -6,7 +6,8 @@  struct rtx_def
   int code;
 };
 
-main()
+int
+main(void)
 {
   int tmp[2];
   struct rtx_def *r, s;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20031012-1.c b/gcc/testsuite/gcc.c-torture/execute/20031012-1.c
index e02baf55cbc..63318b92c2b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20031012-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20031012-1.c
@@ -23,7 +23,7 @@  static void foo ()
     a[0]=0;
     memset( &a[0], 0xCD, STRLEN );
     a[STRLEN]=0;
-    if (strlen(a) != STRLEN)
+    if (__builtin_strlen(a) != STRLEN)
       abort ();
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20031211-1.c b/gcc/testsuite/gcc.c-torture/execute/20031211-1.c
index 3161fff8e73..56efce81c02 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20031211-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20031211-1.c
@@ -5,7 +5,8 @@  struct a { unsigned int bitfield : 1; };
 
 unsigned int x;
 
-main()
+int
+main(void)
 {
   struct a a = {0};
   x = 0xbeef;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040319-1.c b/gcc/testsuite/gcc.c-torture/execute/20040319-1.c
index 37eff8e5ca0..200aee876af 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040319-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040319-1.c
@@ -11,7 +11,8 @@  blah (int zzz)
   return foo;
 }
 
-main()
+int
+main(void)
 {
   if (blah (-1) != 1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040411-1.c b/gcc/testsuite/gcc.c-torture/execute/20040411-1.c
index 19d7e41c8e5..fbc7f7b4de1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040411-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040411-1.c
@@ -8,7 +8,7 @@  sub1 (int i, int j)
 
   if (j == 2)
     {
-      memcpy (x, y, 10 * sizeof (int));
+      __builtin_memcpy (x, y, 10 * sizeof (int));
       return sizeof (c);
     }
   else
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040423-1.c b/gcc/testsuite/gcc.c-torture/execute/20040423-1.c
index 06e2c439eca..bc666e5351e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040423-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040423-1.c
@@ -11,7 +11,7 @@  sub1 (int i, int j)
 
   if (j == 2)
     {
-      memcpy (x, y, 10 * sizeof (int));
+      __builtin_memcpy (x, y, 10 * sizeof (int));
       return sizeof (c);
     }
   else
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040917-1.c b/gcc/testsuite/gcc.c-torture/execute/20040917-1.c
index 8a5d196bbd9..26465ab8a6c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20040917-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20040917-1.c
@@ -22,7 +22,8 @@  not_inlinable ()
   inlinable();
 }
 
-main ()
+int
+main (void)
 {
   test_var = 10;
   /* Variable test_var should be considered call-clobbered by the call
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050131-1.c b/gcc/testsuite/gcc.c-torture/execute/20050131-1.c
index 9fae91181d5..a0d6ec56be6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050131-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20050131-1.c
@@ -10,7 +10,8 @@  foo (int a)
   return a;
 }
 
-main()
+int
+main(void)
 {
   if (foo (9) != 10)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/20051113-1.c b/gcc/testsuite/gcc.c-torture/execute/20051113-1.c
index 8c9e7e8ed75..a829af2b8a3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20051113-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20051113-1.c
@@ -54,7 +54,7 @@  long long Sum2 (Struct3 *instrs)
     }
     return count;
 }
-main() {
+int main(void) {
   Struct3 *p = malloc (sizeof (int) + 3 * sizeof(Union));
   memset(p, 0, sizeof(int) + 3*sizeof(Union));
   p->Count = 3;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20121108-1.c b/gcc/testsuite/gcc.c-torture/execute/20121108-1.c
index 5ec889e602c..409b1d45990 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20121108-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20121108-1.c
@@ -41,11 +41,11 @@  int string_to_ip(const char *s)
 int main(void)
 {
   int t = string_to_ip (temp);
-  printf ("%x\n", t);
-  printf ("%x\n", result);
+  __builtin_printf ("%x\n", t);
+  __builtin_printf ("%x\n", result);
   if (t != result)
     __builtin_abort ();
-  printf ("WORKS.\n");
+  __builtin_printf ("WORKS.\n");
   return 0;
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20170401-2.c b/gcc/testsuite/gcc.c-torture/execute/20170401-2.c
index 16341ca19d9..f70f7bcf62d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20170401-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20170401-2.c
@@ -11,7 +11,8 @@  struct adjust_template
 
 static struct adjust_template adjust = {1, 1};
 
-main ()
+int
+main (void)
 {
   short x = 1, y = 1;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/900409-1.c b/gcc/testsuite/gcc.c-torture/execute/900409-1.c
index 5b743c02abf..8a6d6e54de0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/900409-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/900409-1.c
@@ -8,7 +8,8 @@  long f4(long a){return a&~0x000000ffL;}
 long f5(long a){return a&0x0000ffffL;}
 long f6(long a){return a&~0x0000ffffL;}
 
-main ()
+int
+main (void)
 {
   long a = 0x89ABCDEF;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/920202-1.c b/gcc/testsuite/gcc.c-torture/execute/920202-1.c
index f97b67a7207..1be784e2c21 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920202-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920202-1.c
@@ -3,6 +3,7 @@  void exit (int);
 static int rule_text_needs_stack_pop = 0;
 static int input_stack_pos = 1;
 
+int
 f (void)
 {
   rule_text_needs_stack_pop = 1;
@@ -13,7 +14,8 @@  f (void)
     return 0;
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/920302-1.c b/gcc/testsuite/gcc.c-torture/execute/920302-1.c
index c11f1285a26..65ebe09feb8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920302-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920302-1.c
@@ -5,6 +5,7 @@  void exit (int);
 
 short optab[5];
 char buf[10];
+void
 execute (ip)
      register short *ip;
 {
@@ -29,7 +30,8 @@  z:  *bp++='z';
 
 short p[5];
 
-main ()
+int
+main (void)
 {
   execute ((short *) 0);
   p[0] = optab[1];
@@ -37,7 +39,7 @@  main ()
   p[2] = optab[1];
   p[3] = optab[2];
   execute (&p);
-  if (strcmp (buf, "xyxyz"))
+  if (__builtin_strcmp (buf, "xyxyz"))
     abort ();
   exit (0);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/920410-1.c b/gcc/testsuite/gcc.c-torture/execute/920410-1.c
index 1b256bc44e6..6c598fd8bc7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920410-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920410-1.c
@@ -2,5 +2,5 @@ 
 
 void exit (int);
 
-main(){int d[40000];d[0]=0;exit(0);}
+int main(void){int d[40000];d[0]=0;exit(0);}
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-2.c b/gcc/testsuite/gcc.c-torture/execute/920501-2.c
index bd501d43135..16fc339d5d2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920501-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920501-2.c
@@ -98,7 +98,8 @@  facts (t, a_int, x0, p)
     }
 }
 
-main ()
+int
+main (void)
 {
   unsigned long long t;
   unsigned x0, a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-3.c b/gcc/testsuite/gcc.c-torture/execute/920501-3.c
index c81fd5cca39..a08754e7fc1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920501-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920501-3.c
@@ -4,6 +4,7 @@  void abort (void);
 void exit (int);
 
 int tab[9];
+void
 execute(oip, ip)
      unsigned short *oip, *ip;
 {
@@ -20,7 +21,8 @@  base:
   goto *(&&base + *ip++);
 }
 
-main()
+int
+main(void)
 {
   unsigned short ip[10];
   int i;
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-5.c b/gcc/testsuite/gcc.c-torture/execute/920501-5.c
index b9882eaf5b1..8c4bf03fe65 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920501-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920501-5.c
@@ -3,6 +3,7 @@ 
 void abort (void);
 void exit (int);
 
+int
 x (int i)
 {
   void *j[] = {&&x, &&y, &&z};
@@ -12,7 +13,8 @@  x (int i)
  z:return 5;
 
 }
-main ()
+int
+main (void)
 {
   if (x (0) != 2 || x (1) != 3 || x (2) != 5)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-6.c b/gcc/testsuite/gcc.c-torture/execute/920501-6.c
index 82b6c64f830..166f51644cb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920501-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920501-6.c
@@ -79,6 +79,7 @@  int plist (p0, p1, tab)
   return xp - tab;
 }
 
+int
 main (argc, argv)
      int argc;
      char *argv[];
diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-8.c b/gcc/testsuite/gcc.c-torture/execute/920501-8.c
index 9e484309d41..a8bb097efdd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920501-8.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920501-8.c
@@ -34,10 +34,11 @@  va (int a, double b, int c, ...)
   va_end (ap);
 }
 
-main()
+int
+main(void)
 {
   va (1, 1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
-  if (strcmp ("1,1.000000,2,3,4,5,6,7,8,9,10,11,12,13,14,15", buf))
+  if (__builtin_strcmp ("1,1.000000,2,3,4,5,6,7,8,9,10,11,12,13,14,15", buf))
     abort();
   exit(0);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/920506-1.c b/gcc/testsuite/gcc.c-torture/execute/920506-1.c
index 38af6ba2063..a93a5769804 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920506-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920506-1.c
@@ -1,4 +1,4 @@ 
 void abort (void);
 void exit (int);
 int l[]={0,1};
-main(){int*p=l;switch(*p++){case 0:exit(0);case 1:break;case 2:break;case 3:case 4:break;}abort();}
+int main(void){int*p=l;switch(*p++){case 0:exit(0);case 1:break;case 2:break;case 3:case 4:break;}abort();}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920612-2.c b/gcc/testsuite/gcc.c-torture/execute/920612-2.c
index d3eb0ebba01..90030039662 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920612-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920612-2.c
@@ -3,7 +3,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   int i = 0;
   int a (int x)
diff --git a/gcc/testsuite/gcc.c-torture/execute/920618-1.c b/gcc/testsuite/gcc.c-torture/execute/920618-1.c
index 5059482229e..53ea3ef4d71 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920618-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920618-1.c
@@ -1,3 +1,3 @@ 
 void abort (void);
 void exit (int);
-main(){if(1.17549435e-38F<=1.1)exit(0);abort();}
+int main(void){if(1.17549435e-38F<=1.1)exit(0);abort();}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920625-1.c b/gcc/testsuite/gcc.c-torture/execute/920625-1.c
index 7aa2ed90dc6..4e9f5df0fb7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920625-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920625-1.c
@@ -33,7 +33,8 @@  static int va2(int nargs,...)
   va_end(args);
 }
 
-main()
+int
+main(void)
 {
 va1(4,pts[0],pts[1],pts[2],pts[3]);
 va2(4,ipts[0],ipts[1],ipts[2],ipts[3]);
diff --git a/gcc/testsuite/gcc.c-torture/execute/920710-1.c b/gcc/testsuite/gcc.c-torture/execute/920710-1.c
index dfef3ea2997..1bef7ea38aa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920710-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920710-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   if ((double) 18446744073709551615ULL < 1.84467440737095e+19 ||
       (double) 18446744073709551615ULL > 1.84467440737096e+19)
diff --git a/gcc/testsuite/gcc.c-torture/execute/920721-1.c b/gcc/testsuite/gcc.c-torture/execute/920721-1.c
index a77b2dc1537..e5fabbde437 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920721-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920721-1.c
@@ -1,4 +1,4 @@ 
 void abort (void);
 void exit (int);
 long f(short a,short b){return (long)a/b;}
-main(){if(f(-32768,-1)!=32768L)abort();else exit(0);}
+int main(void){if(f(-32768,-1)!=32768L)abort();else exit(0);}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920721-4.c b/gcc/testsuite/gcc.c-torture/execute/920721-4.c
index 6462ee31077..a4cb074ad69 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920721-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920721-4.c
@@ -49,7 +49,8 @@  int try (int num) {
   return -1;
 }
 
-main()
+int
+main(void)
 {
   int i;
   for (i = 1; i <= 6; i++)
diff --git a/gcc/testsuite/gcc.c-torture/execute/920726-1.c b/gcc/testsuite/gcc.c-torture/execute/920726-1.c
index 5afaa2ed1ff..42a2cff96df 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920726-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920726-1.c
@@ -22,7 +22,7 @@  int first(char *buf, char *fmt, ...)
       {
 	number = va_arg(args, int);
 	sprintf(bp, "%d", number);
-	bp += strlen(bp);
+	bp += __builtin_strlen(bp);
       }
     else
       *bp++ = fmt[pos];
@@ -45,7 +45,7 @@  struct spurious second(char *buf,char *fmt, ...)
       {
 	number = va_arg(args, int);
 	sprintf(bp, "%d", number);
-	bp += strlen(bp);
+	bp += __builtin_strlen(bp);
       }
     else
       *bp++ = fmt[pos];
@@ -55,12 +55,13 @@  struct spurious second(char *buf,char *fmt, ...)
   return dummy;
 }
 
-main()
+int
+main(void)
 {
   char buf1[100], buf2[100];
   first(buf1, "i i ", 5, 20);
   second(buf2, "i i ", 5, 20);
-  if (strcmp ("5 20 ", buf1) || strcmp ("5 20 ", buf2))
+  if (__builtin_strcmp ("5 20 ", buf1) || __builtin_strcmp ("5 20 ", buf2))
     abort();
   exit(0);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/920810-1.c b/gcc/testsuite/gcc.c-torture/execute/920810-1.c
index 9565bfc1a2b..fa06d8c7be6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920810-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920810-1.c
@@ -12,7 +12,7 @@  t*f(t*clas,int size)
   child->size=size;
   return child;
 }
-main()
+int main(void)
 {
   t foo,*bar;
   memset(&foo,37,sizeof(t));
diff --git a/gcc/testsuite/gcc.c-torture/execute/920829-1.c b/gcc/testsuite/gcc.c-torture/execute/920829-1.c
index 3f612d8eb78..46c5873bbe4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920829-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920829-1.c
@@ -1,4 +1,4 @@ 
 void abort (void);
 void exit (int);
 long long c=2863311530LL,c3=2863311530LL*3;
-main(){if(c*3!=c3)abort();exit(0);}
+int main(void){if(c*3!=c3)abort();exit(0);}
diff --git a/gcc/testsuite/gcc.c-torture/execute/920908-1.c b/gcc/testsuite/gcc.c-torture/execute/920908-1.c
index c56334eb5da..25006e39d6a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920908-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920908-1.c
@@ -20,7 +20,8 @@  va_end(ap);
 return X;
 }
 
-main()
+int
+main(void)
 {
 T X,Y;
 int i;
diff --git a/gcc/testsuite/gcc.c-torture/execute/920922-1.c b/gcc/testsuite/gcc.c-torture/execute/920922-1.c
index cb838c25d92..766f1043e95 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920922-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920922-1.c
@@ -8,7 +8,8 @@  f(p)unsigned long*p;
   return p + a;
 }
 
-main ()
+int
+main (void)
 {
   unsigned long x = 0x80000000UL;
   if (f(&x) != &x + 0x81)
diff --git a/gcc/testsuite/gcc.c-torture/execute/920929-1.c b/gcc/testsuite/gcc.c-torture/execute/920929-1.c
index 5ef83dc80e4..ba86af81690 100644
--- a/gcc/testsuite/gcc.c-torture/execute/920929-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/920929-1.c
@@ -1,6 +1,7 @@ 
 /* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
 /* REPRODUCED:RUN:SIGNAL MACHINE:sparc OPTIONS: */
 void exit (int);
+void
 f(int n)
 {
 int i;
@@ -8,7 +9,8 @@  double v[n];
 for(i=0;i<n;i++)
 v[i]=0;
 }
-main()
+int
+main(void)
 {
 f(100);
 exit(0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/921006-1.c b/gcc/testsuite/gcc.c-torture/execute/921006-1.c
index 3e897412b5e..787fa266791 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921006-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921006-1.c
@@ -1,8 +1,9 @@ 
 /* REPRODUCED:RUN:SIGNAL MACHINE:i386 OPTIONS:-O */
 void abort(void);
 void exit(int);
-main()
+int
+main(void)
 {
-if(strcmp("X","")<0)abort();
+if(__builtin_strcmp("X","")<0)abort();
 exit(0);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/921007-1.c b/gcc/testsuite/gcc.c-torture/execute/921007-1.c
index 940ee2e175c..b4387b3294a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921007-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921007-1.c
@@ -2,7 +2,8 @@  void abort(void);
 void exit(int);
 static int strcmp(){return-1;}
 #define strcmp __builtin_strcmp
-main()
+int
+main(void)
 {
 if(strcmp("X","X\376")>=0)abort();
 exit(0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/921016-1.c b/gcc/testsuite/gcc.c-torture/execute/921016-1.c
index 4ae22c666a1..01baf70a702 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921016-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921016-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
 int j=1081;
 struct
diff --git a/gcc/testsuite/gcc.c-torture/execute/921019-1.c b/gcc/testsuite/gcc.c-torture/execute/921019-1.c
index e9b5e2a1c9c..72b035a407e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921019-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921019-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 void *foo[]={(void *)&("X"[0])};
 
-main ()
+int
+main (void)
 {
   if (((char*)foo[0])[0] != 'X')
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/921019-2.c b/gcc/testsuite/gcc.c-torture/execute/921019-2.c
index f1dd3a584e6..6d11a4630da 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921019-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921019-2.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   double x,y=0.5;
   x=y/0.2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/921029-1.c b/gcc/testsuite/gcc.c-torture/execute/921029-1.c
index 0f4c02eb2cb..ed0233053f1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921029-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921029-1.c
@@ -15,7 +15,8 @@  build(long h, long l)
   return back;
 }
 
-main()
+int
+main(void)
 {
   if (build(0, 1) != 0x0000000000000001LL)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/921104-1.c b/gcc/testsuite/gcc.c-torture/execute/921104-1.c
index 8725c041da5..ad1d565b74b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921104-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921104-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   unsigned long val = 1;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/921112-1.c b/gcc/testsuite/gcc.c-torture/execute/921112-1.c
index 18a7ca1e65b..4b5e8d942af 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921112-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921112-1.c
@@ -6,13 +6,15 @@  union u {
   double d;
 } x[2], v;
 
+void
 f (x, v)
      union u *x, v;
 {
   *++x = v;
 }
 
-main()
+int
+main(void)
 {
   x[1].t.i1 = x[1].t.i2 = 0;
   v.t.i1 = 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/921113-1.c b/gcc/testsuite/gcc.c-torture/execute/921113-1.c
index 9bf8a13533d..78771708c1f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921113-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921113-1.c
@@ -13,19 +13,22 @@  typedef struct {
   float x, y;
 } vector_t;
 
-w(float x, float y) {}
+void w(float x, float y) {}
 
+void
 f1(float x, float y)
 {
   if (x != 0 || y != 0)
     abort();
 }
+void
 f2(float x, float y)
 {
   if (x != 1 || y != 1)
     abort();
 }
 
+void
 gitter(int count, vector_t pos[], list_t list, int *nww, vector_t limit[2], float r)
 {
   float d;
@@ -51,7 +54,8 @@  gitter(int count, vector_t pos[], list_t list, int *nww, vector_t limit[2], floa
 vector_t pos[1] = {{0., 0.}};
 vector_t limit[2] = {{0.,0.},{1.,1.}};
 
-main()
+int
+main(void)
 {
   int nww;
   struct_list list;
diff --git a/gcc/testsuite/gcc.c-torture/execute/921117-1.c b/gcc/testsuite/gcc.c-torture/execute/921117-1.c
index 04da4226ca5..f28c6a5b736 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921117-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921117-1.c
@@ -11,13 +11,14 @@  check (struct s p)
 {
   if (p.flag != 99)
     return 1;
-  return strcmp (p.text, "0123456789");
+  return __builtin_strcmp (p.text, "0123456789");
 }
 
-main ()
+int
+main (void)
 {
   cell.flag = 99;
-  strcpy (cell.text, "0123456789");
+  __builtin_strcpy (cell.text, "0123456789");
 
   if (check (cell))
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/921123-2.c b/gcc/testsuite/gcc.c-torture/execute/921123-2.c
index 2ac7ca22276..137abe771a1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921123-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921123-2.c
@@ -15,7 +15,8 @@  void f (four_quarters j)
   a = j.b3;
 }
 
-main ()
+int
+main (void)
 {
   four_quarters x;
   x.b0 = x.b1 = x.b2 = 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/921202-2.c b/gcc/testsuite/gcc.c-torture/execute/921202-2.c
index 1115a4d3eda..aa3efca36a5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921202-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921202-2.c
@@ -8,7 +8,8 @@  f(long long x)
   return x & 0xff;
 }
 
-main()
+int
+main(void)
 {
   if (f(0x0123456789ABCDEFLL) != 0xCD)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/921204-1.c b/gcc/testsuite/gcc.c-torture/execute/921204-1.c
index 2f69f644dc0..e34a29d6e10 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921204-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921204-1.c
@@ -34,7 +34,8 @@  f(bu i)
   return o;
 }
 
-main()
+int
+main(void)
 {
   bu a;
   bu r;
diff --git a/gcc/testsuite/gcc.c-torture/execute/921208-1.c b/gcc/testsuite/gcc.c-torture/execute/921208-1.c
index b950f413109..6ca6f4b82fd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921208-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921208-1.c
@@ -13,7 +13,8 @@  Int(double (*f)(double), double a)
   return (*f)(a);
 }
 
-main()
+int
+main(void)
 {
   if (Int(&f,2.0) != 4.0)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/930123-1.c b/gcc/testsuite/gcc.c-torture/execute/930123-1.c
index f5812317eb7..3e35203faac 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930123-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930123-1.c
@@ -1,12 +1,14 @@ 
 void abort (void);
 void exit (int);
 
+void
 f(int *x)
 {
   *x = 0;
 }
 
-main()
+int
+main(void)
 {
   int s, c, x;
   char a[] = "c";
diff --git a/gcc/testsuite/gcc.c-torture/execute/930126-1.c b/gcc/testsuite/gcc.c-torture/execute/930126-1.c
index 2f514cc3194..f0ac176afc1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930126-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930126-1.c
@@ -12,7 +12,8 @@  f(struct s x)
   return x;
 }
 
-main()
+int
+main(void)
 {
   static struct s i;
   i.a = 12;
diff --git a/gcc/testsuite/gcc.c-torture/execute/930406-1.c b/gcc/testsuite/gcc.c-torture/execute/930406-1.c
index 4dc59dcb07c..910d1810b3d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930406-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930406-1.c
@@ -2,7 +2,8 @@ 
 
 void exit (int);
 
-f()
+void
+f(void)
 {
   int x = 1;
 #if defined(STACK_SIZE)
@@ -21,7 +22,8 @@  f()
   exit(0);
 }
 
-main()
+int
+main(void)
 {
   f();
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/930408-1.c b/gcc/testsuite/gcc.c-torture/execute/930408-1.c
index c756eecc4eb..89a1cb52a60 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930408-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930408-1.c
@@ -8,12 +8,14 @@  struct {
   E eval;
 } s;
 
-p()
+void
+p(void)
 {
   abort();
 }
 
-f()
+void
+f(void)
 {
   switch (s.eval)
     {
@@ -22,7 +24,8 @@  f()
     }
 }
 
-main()
+int
+main(void)
 {
   s.eval = e1;
   f();
diff --git a/gcc/testsuite/gcc.c-torture/execute/930429-1.c b/gcc/testsuite/gcc.c-torture/execute/930429-1.c
index 1c23dd38956..e1864846c81 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930429-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930429-1.c
@@ -8,7 +8,8 @@  f (char *p)
   return p;
 }
 
-main ()
+int
+main (void)
 {
   char *p = "";
   if (f (p) != p + 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/930603-2.c b/gcc/testsuite/gcc.c-torture/execute/930603-2.c
index bfa4b2fafeb..014879a40c2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930603-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930603-2.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int w[2][2];
 
-f ()
+void
+f (void)
 {
   int i, j;
 
@@ -13,7 +14,8 @@  f ()
 	w[i][j] = 1;
 }
 
-main ()
+int
+main (void)
 {
   f ();
   if (w[0][0] != 1 || w[1][1] != 1 || w[1][0] != 0 || w[0][1] != 0)
diff --git a/gcc/testsuite/gcc.c-torture/execute/930608-1.c b/gcc/testsuite/gcc.c-torture/execute/930608-1.c
index d81a2544a41..1f29aa5d07b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930608-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930608-1.c
@@ -4,7 +4,8 @@  void exit (int);
 double f (double a) {}
 double (* const a[]) (double) = {&f};
 
-main ()
+int
+main (void)
 {
   double (*p) ();
   p = &f;
diff --git a/gcc/testsuite/gcc.c-torture/execute/930614-1.c b/gcc/testsuite/gcc.c-torture/execute/930614-1.c
index 736371a6f0e..cc30579691c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930614-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930614-1.c
@@ -1,12 +1,14 @@ 
 void abort (void);
 void exit (int);
 
+void
 f (double *ty)
 {
   *ty = -1.0;
 }
 
-main ()
+int
+main (void)
 {
   double foo[6];
   double tx = 0.0, ty, d;
diff --git a/gcc/testsuite/gcc.c-torture/execute/930614-2.c b/gcc/testsuite/gcc.c-torture/execute/930614-2.c
index 76e4142e20f..b46edefdc2d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930614-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930614-2.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   int i, j, k, l;
   float x[8][2][8][2];
diff --git a/gcc/testsuite/gcc.c-torture/execute/930622-2.c b/gcc/testsuite/gcc.c-torture/execute/930622-2.c
index 7b165b14ee8..d9849a4f8aa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930622-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930622-2.c
@@ -13,7 +13,8 @@  ld_to_ll (long double n)
   return n;
 }
 
-main ()
+int
+main (void)
 {
   long long n;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/930628-1.c b/gcc/testsuite/gcc.c-torture/execute/930628-1.c
index b68ecefcd47..5e05a2d2c9f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930628-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930628-1.c
@@ -1,13 +1,15 @@ 
 void abort (void);
 void exit (int);
 
+void
 f (double x[2], double y[2])
 {
   if (x == y)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct { int f[3]; double x[1][2]; } tp[4][2];
   int i, j, ki, kj, mi, mj;
diff --git a/gcc/testsuite/gcc.c-torture/execute/930725-1.c b/gcc/testsuite/gcc.c-torture/execute/930725-1.c
index 55bcdde19c9..465ae5da300 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930725-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930725-1.c
@@ -15,10 +15,11 @@  f ()
   return (v == 0 ? g () : "abc");
 }
 
-main ()
+int
+main (void)
 {
   v = 1;
-  if (!strcmp (f (), "abc"))
+  if (!__builtin_strcmp (f (), "abc"))
     exit (0);
   abort();
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/930930-2.c b/gcc/testsuite/gcc.c-torture/execute/930930-2.c
index 83c4f3deea4..7edf0e18848 100644
--- a/gcc/testsuite/gcc.c-torture/execute/930930-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/930930-2.c
@@ -25,7 +25,8 @@  test_endianness_vol()
   return dw.u[0] != 0 ? 1 : 0;
 }
 
-main ()
+int
+main (void)
 {
   if (test_endianness () != test_endianness_vol ())
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/931002-1.c b/gcc/testsuite/gcc.c-torture/execute/931002-1.c
index f2b335757c5..ce5027b322c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931002-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931002-1.c
@@ -2,12 +2,14 @@ 
 
 void exit (int);
 
+void
 f (void (*func) ())
 {
   func ();
 }
 
-main ()
+int
+main (void)
 {
   void t0 ()
     {
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-1.c b/gcc/testsuite/gcc.c-torture/execute/931004-1.c
index 54509b76629..3a5a0e377c8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-1.c
@@ -6,6 +6,7 @@  struct tiny
   int c;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -21,7 +22,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-10.c b/gcc/testsuite/gcc.c-torture/execute/931004-10.c
index d516d54df5d..185a9686650 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-10.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-10.c
@@ -9,6 +9,7 @@  struct tiny
   char d;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -32,7 +33,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-11.c b/gcc/testsuite/gcc.c-torture/execute/931004-11.c
index 770ca79e308..17f1c122159 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-11.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-11.c
@@ -8,6 +8,7 @@  struct tiny
   char e;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -35,7 +36,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-12.c b/gcc/testsuite/gcc.c-torture/execute/931004-12.c
index f41319baefc..08f89ca5216 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-12.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-12.c
@@ -10,6 +10,7 @@  struct tiny
   char e;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -35,7 +36,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-13.c b/gcc/testsuite/gcc.c-torture/execute/931004-13.c
index c2cfa142b0c..8b79679087c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-13.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-13.c
@@ -9,6 +9,7 @@  struct tiny
   char f;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -42,7 +43,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+void
+main (int)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-14.c b/gcc/testsuite/gcc.c-torture/execute/931004-14.c
index ab4e2461a51..d702f2ba46c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-14.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-14.c
@@ -11,6 +11,7 @@  struct tiny
   char f;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -38,7 +39,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-2.c b/gcc/testsuite/gcc.c-torture/execute/931004-2.c
index faf1dd52f4b..775c540cffe 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-2.c
@@ -8,6 +8,7 @@  struct tiny
   int c;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -29,7 +30,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-3.c b/gcc/testsuite/gcc.c-torture/execute/931004-3.c
index 0dc9977369f..06e16af00cf 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-3.c
@@ -6,6 +6,7 @@  struct tiny
   short c;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -21,7 +22,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-4.c b/gcc/testsuite/gcc.c-torture/execute/931004-4.c
index 405dc52581c..479e2cd726b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-4.c
@@ -8,6 +8,7 @@  struct tiny
   short c;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -29,7 +30,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-5.c b/gcc/testsuite/gcc.c-torture/execute/931004-5.c
index bbe19804163..4d3953356e6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-5.c
@@ -7,6 +7,7 @@  struct tiny
   short d;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -28,7 +29,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-6.c b/gcc/testsuite/gcc.c-torture/execute/931004-6.c
index 7778d97d857..bd66c83d5e5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-6.c
@@ -9,6 +9,7 @@  struct tiny
   short d;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -32,7 +33,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-7.c b/gcc/testsuite/gcc.c-torture/execute/931004-7.c
index 4bcd971c53f..f163d1a4a9d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-7.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-7.c
@@ -6,6 +6,7 @@  struct tiny
   char c;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -21,7 +22,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-8.c b/gcc/testsuite/gcc.c-torture/execute/931004-8.c
index 7ef91a00c6a..706d3793aa3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-8.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-8.c
@@ -8,6 +8,7 @@  struct tiny
   char c;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -29,7 +30,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931004-9.c b/gcc/testsuite/gcc.c-torture/execute/931004-9.c
index 8d025356147..8a12691beb8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931004-9.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931004-9.c
@@ -7,6 +7,7 @@  struct tiny
   char d;
 };
 
+void
 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
 {
   if (x.c != 10)
@@ -28,7 +29,8 @@  f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931005-1.c b/gcc/testsuite/gcc.c-torture/execute/931005-1.c
index 3082890b132..e998022f06c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931005-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931005-1.c
@@ -15,7 +15,8 @@  f (s1)
   return s1a;
 }
 
-main ()
+int
+main (void)
 {
   T s1a, s1b;
   s1a.x = 100;
diff --git a/gcc/testsuite/gcc.c-torture/execute/931110-1.c b/gcc/testsuite/gcc.c-torture/execute/931110-1.c
index 6943583fee2..f61d7b86b85 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931110-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931110-1.c
@@ -11,7 +11,8 @@  struct
   small s[10];
 } x;
 
-main ()
+int
+main (void)
 {
   int i;
   for (i = 0; i < 10; i++)
diff --git a/gcc/testsuite/gcc.c-torture/execute/931110-2.c b/gcc/testsuite/gcc.c-torture/execute/931110-2.c
index 4f6e166aac8..a183de25b7b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/931110-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/931110-2.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   static int a[] = {3, 4};
   register int *b;
diff --git a/gcc/testsuite/gcc.c-torture/execute/941014-1.c b/gcc/testsuite/gcc.c-torture/execute/941014-1.c
index 002f1c69fc2..bb35011426e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941014-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941014-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int f (int a, int b) { }
 
-main ()
+int
+main (void)
 {
   unsigned long addr1;
   unsigned long addr2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/941014-2.c b/gcc/testsuite/gcc.c-torture/execute/941014-2.c
index 3932a34ce92..3493a208164 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941014-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941014-2.c
@@ -22,7 +22,8 @@  f ()
   return foo_p;
 }
 
-main ()
+int
+main (void)
 {
   volatile foo_t *foo_p;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/941015-1.c b/gcc/testsuite/gcc.c-torture/execute/941015-1.c
index 3703bb57124..a620f028c5b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941015-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941015-1.c
@@ -25,7 +25,8 @@  foo2 (value)
     return 2;
 }
 
-main ()
+int
+main (void)
 {
   unsigned long long value = 0xc000000000000001LL;
   int x, y;
diff --git a/gcc/testsuite/gcc.c-torture/execute/941021-1.c b/gcc/testsuite/gcc.c-torture/execute/941021-1.c
index a239fb38c4d..9edc390ca7c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941021-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941021-1.c
@@ -3,6 +3,7 @@  void exit (int);
 
 double glob_dbl;
 
+void
 f (pdbl, value)
      double *pdbl;
      double value;
@@ -13,7 +14,8 @@  f (pdbl, value)
   *pdbl = value;
 }
 
-main ()
+int
+main (void)
 {
   f ((void *) 0, 55.1);
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/941025-1.c b/gcc/testsuite/gcc.c-torture/execute/941025-1.c
index e2db7c22c31..013f113c2f2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941025-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941025-1.c
@@ -7,7 +7,8 @@  long f (x, y)
   return (x > 1) ? y : (y & 1);
 }
 
-main ()
+int
+main (void)
 {
   if (f (2L, 0xdecadeL) != 0xdecadeL)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/941031-1.c b/gcc/testsuite/gcc.c-torture/execute/941031-1.c
index 96992970274..80af50036e5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/941031-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/941031-1.c
@@ -22,7 +22,8 @@  f (mpt us, mpt vs)
   return avs;
 }
 
-main ()
+int
+main (void)
 {
   if (f ((mpt) 3, (mpt) 17) != 17)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/950221-1.c b/gcc/testsuite/gcc.c-torture/execute/950221-1.c
index 3c307026ac6..974b8731f06 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950221-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950221-1.c
@@ -24,6 +24,7 @@  g1 (a, b)
 {
 }
 
+int
 g2 (a)
      long a;
 {
@@ -32,7 +33,8 @@  g2 (a)
   exit (0);
 }
 
-f ()
+void
+f (void)
 {
   register char *p, *q;
   register int i;
@@ -43,7 +45,7 @@  f ()
       const char *rl_cp;
       int len;
       rl_cp = g1 (el, &len);
-      strcpy (p, rl_cp);
+      __builtin_strcpy (p, rl_cp);
     }
   else
     {
@@ -52,7 +54,8 @@  f ()
     }
 }
 
-main ()
+int
+main (void)
 {
   el = 0;
   parsefile->fd = 0xdeadbeefL;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950426-2.c b/gcc/testsuite/gcc.c-torture/execute/950426-2.c
index 9421fa7522a..e7d2d1db63e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950426-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950426-2.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   long int i = -2147483647L - 1L; /* 0x80000000 */
   char ca = 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950503-1.c b/gcc/testsuite/gcc.c-torture/execute/950503-1.c
index 2ecad296b55..8b11cfd3795 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950503-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950503-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   int tmp;
   unsigned long long utmp1, utmp2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950511-1.c b/gcc/testsuite/gcc.c-torture/execute/950511-1.c
index 46d00210177..abf0fcc9657 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950511-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950511-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   unsigned long long xx;
   unsigned long long *x = (unsigned long long *) &xx;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950607-1.c b/gcc/testsuite/gcc.c-torture/execute/950607-1.c
index 23ff4c78b4d..34ff8860e87 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950607-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950607-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   struct { long status; } h;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/950607-2.c b/gcc/testsuite/gcc.c-torture/execute/950607-2.c
index ff111c13091..f4a915875c4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950607-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950607-2.c
@@ -22,7 +22,8 @@  f (Point basePt, Point pt1, Point pt2)
     return 2;
 }
 
-main ()
+int
+main (void)
 {
   Point b, p1, p2;
   int answer;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950612-1.c b/gcc/testsuite/gcc.c-torture/execute/950612-1.c
index 696a7c116e5..4474d166ee2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950612-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950612-1.c
@@ -25,7 +25,8 @@  f4 (unsigned long long diff)
   return ((unsigned long long) ((signed long long) diff < 0 ? -diff : diff));
 }
 
-main ()
+int
+main (void)
 {
   int i;
   for (i = 0; i <= 10; i++)
diff --git a/gcc/testsuite/gcc.c-torture/execute/950628-1.c b/gcc/testsuite/gcc.c-torture/execute/950628-1.c
index 50b58641bba..8727c466f30 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950628-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950628-1.c
@@ -26,7 +26,8 @@  T f (void)
   return virk;
 }
 
-main ()
+int
+main (void)
 {
   if (f ().hours != 1 || f ().day != 2 || f ().month != 3 || f ().year != 4)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/950704-1.c b/gcc/testsuite/gcc.c-torture/execute/950704-1.c
index 782b0448db2..90ad441e664 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950704-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950704-1.c
@@ -25,7 +25,8 @@  f (long long x, long long y)
   return 0;
 }
 
-main ()
+int
+main (void)
 {
   f (0, 0);
   if (errflag)
diff --git a/gcc/testsuite/gcc.c-torture/execute/950706-1.c b/gcc/testsuite/gcc.c-torture/execute/950706-1.c
index 8acd7233879..919fd4592bc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950706-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950706-1.c
@@ -7,7 +7,8 @@  f (int n)
   return (n > 0) - (n < 0);
 }
 
-main ()
+int
+main (void)
 {
   if (f (-1) != -1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/950710-1.c b/gcc/testsuite/gcc.c-torture/execute/950710-1.c
index 209078d4ab3..2a641a01fe4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950710-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950710-1.c
@@ -50,7 +50,8 @@  f ()
     }
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/950714-1.c b/gcc/testsuite/gcc.c-torture/execute/950714-1.c
index 6d4dea420bd..ff4d20f550f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950714-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950714-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int array[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
 
-main ()
+int
+main (void)
 {
   int i, j;
   int *p;
diff --git a/gcc/testsuite/gcc.c-torture/execute/950809-1.c b/gcc/testsuite/gcc.c-torture/execute/950809-1.c
index fad9a658be5..fc46c4121b7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950809-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950809-1.c
@@ -6,6 +6,7 @@  struct S
   int *sp, fc, *sc, a[2];
 };
 
+void
 f (struct S *x)
 {
   int *t = x->sc;
@@ -22,7 +23,8 @@  f (struct S *x)
   x->sp = t;
 }
 
-main ()
+int
+main (void)
 {
   struct S s;
   static int sc[3] = {2, 3, 4};
diff --git a/gcc/testsuite/gcc.c-torture/execute/950906-1.c b/gcc/testsuite/gcc.c-torture/execute/950906-1.c
index fb1c5939429..4385d277036 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950906-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950906-1.c
@@ -1,10 +1,12 @@ 
 void abort (void);
 void exit (int);
 
+void
 g (int i)
 {
 }
 
+void
 f (int i)
 {
   g (0);
@@ -12,7 +14,8 @@  f (int i)
     g (0);
 }
 
-main ()
+int
+main (void)
 {
   f (10);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/950915-1.c b/gcc/testsuite/gcc.c-torture/execute/950915-1.c
index 997e7a9dfe5..6d65b84013b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950915-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950915-1.c
@@ -10,7 +10,8 @@  f ()
   return ((long long) a * (long long) b) >> 16;
 }
 
-main ()
+int
+main (void)
 {
   if (f () < 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/950929-1.c b/gcc/testsuite/gcc.c-torture/execute/950929-1.c
index 74967ee6237..53d34b192cb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/950929-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/950929-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int f (char *p) { }
 
-main ()
+int
+main (void)
 {
   char c;
   char c2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/951003-1.c b/gcc/testsuite/gcc.c-torture/execute/951003-1.c
index 633ff8f5b8e..f67d3e8cb9d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/951003-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/951003-1.c
@@ -1,10 +1,11 @@ 
 void abort (void);
 void exit (int);
 
-int f (i) { return 12; }
+int f (int i) { return 12; }
 int g () { return 0; }
 
-main ()
+int
+main (void)
 {
   int i, s;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/951115-1.c b/gcc/testsuite/gcc.c-torture/execute/951115-1.c
index 98189ee5c80..75e2308e69c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/951115-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/951115-1.c
@@ -3,11 +3,13 @@  void exit (int);
 
 int var = 0;
 
+void
 g ()
 {
   var = 1;
 }
 
+void
 f ()
 {
   int f2 = 0;
@@ -18,7 +20,8 @@  f ()
   g ();
 }
 
-main ()
+int
+main (void)
 {
   f ();
   if (var != 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/951204-1.c b/gcc/testsuite/gcc.c-torture/execute/951204-1.c
index f34ffa52e63..13ade7e938d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/951204-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/951204-1.c
@@ -1,12 +1,14 @@ 
 void abort (void);
 void exit (int);
 
+void
 f (char *x)
 {
   *x = 'x';
 }
 
-main ()
+int
+main (void)
 {
   int i;
   char x = '\0';
diff --git a/gcc/testsuite/gcc.c-torture/execute/960116-1.c b/gcc/testsuite/gcc.c-torture/execute/960116-1.c
index 628fce10377..2a4b7a4fcc8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960116-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960116-1.c
@@ -1,7 +1,7 @@ 
 void abort (void);
 void exit (int);
 
-static inline
+static inline int
 p (int *p)
 {
   return !((long) p & 1);
@@ -15,7 +15,8 @@  f (int *q)
   return 0;
 }
 
-main ()
+int
+main (void)
 {
   if (f ((int*) 0xffffffff) != 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960117-1.c b/gcc/testsuite/gcc.c-torture/execute/960117-1.c
index f8ca6aef479..431dcd9cb44 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960117-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960117-1.c
@@ -41,7 +41,8 @@  get_tok ()
   return get_id (c);
 }
 
-main ()
+int
+main (void)
 {
   get_tok ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960209-1.c b/gcc/testsuite/gcc.c-torture/execute/960209-1.c
index ed550ad442a..5ee902b5b02 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960209-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960209-1.c
@@ -38,7 +38,8 @@  f (a, b)
   a_ptr->a_character = (unsigned char) r;
 }
 
-main ()
+int
+main (void)
 {
   if (f (1, 0UL) != 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960215-1.c b/gcc/testsuite/gcc.c-torture/execute/960215-1.c
index 41fa010df04..59d01154f31 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960215-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960215-1.c
@@ -6,7 +6,8 @@  long double U = 1;
 long double Y2 = 3;
 long double Y1 = 1;
 long double X, Y, Z, T, R, S;
-main ()
+int
+main (void)
 {
   X = (C + U) * Y2;
   Y = C - U - U;
diff --git a/gcc/testsuite/gcc.c-torture/execute/960219-1.c b/gcc/testsuite/gcc.c-torture/execute/960219-1.c
index a85f82a05cf..a134941a0f5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960219-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960219-1.c
@@ -1,13 +1,15 @@ 
 void abort (void);
 void exit (int);
 
+void
 f (int i)
 {
   if (((1 << i) & 1) == 0)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f (0);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960301-1.c b/gcc/testsuite/gcc.c-torture/execute/960301-1.c
index 9031a90425e..703f734da85 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960301-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960301-1.c
@@ -17,7 +17,8 @@  bar (unsigned k)
   return 2;
 }
 
-main ()
+int
+main (void)
 {
   if (bar (1U) != 1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960302-1.c b/gcc/testsuite/gcc.c-torture/execute/960302-1.c
index 3689bdaf95a..979230d9969 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960302-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960302-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 long a = 1;
 
-foo ()
+int
+foo (void)
 {
   switch (a % 2 % 2 % 2 % 2 % 2 % 2 % 2 % 2)
     {
@@ -16,7 +17,8 @@  foo ()
     }
 }
 
-main ()
+int
+main (void)
 {
   if (foo () != 1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960311-1.c b/gcc/testsuite/gcc.c-torture/execute/960311-1.c
index f3f2edd8a2c..89cc6bf903f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960311-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960311-1.c
@@ -23,7 +23,8 @@  b (unsigned char data)
   if (data & 0x80) a1();
 }
 
-main ()
+int
+main (void)
 {
   count = 0;
   b (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960311-2.c b/gcc/testsuite/gcc.c-torture/execute/960311-2.c
index 5fad47c76f5..278dfd3f134 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960311-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960311-2.c
@@ -23,7 +23,8 @@  b (unsigned short data)
   if (data & 0x8000) a1();
 }
 
-main ()
+int
+main (void)
 {
   count = 0;
   b (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960311-3.c b/gcc/testsuite/gcc.c-torture/execute/960311-3.c
index 127af869e10..c4efd18dbb3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960311-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960311-3.c
@@ -23,7 +23,8 @@  b (unsigned long data)
   if (data & 0x80000000) a1();
 }
 
-main ()
+int
+main (void)
 {
   count = 0;
   b (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960312-1.c b/gcc/testsuite/gcc.c-torture/execute/960312-1.c
index 1b4f5077e46..f363acb5fb6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960312-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960312-1.c
@@ -6,6 +6,7 @@  struct S
   int *sp, fc, *sc, a[2];
 };
 
+void
 f (struct S *x)
 {
   int *t = x->sc;
@@ -23,7 +24,8 @@  f (struct S *x)
   x->sp = t;
 }
 
-main ()
+int
+main (void)
 {
   struct S s;
   static int sc[3] = {2, 3, 4};
diff --git a/gcc/testsuite/gcc.c-torture/execute/960317-1.c b/gcc/testsuite/gcc.c-torture/execute/960317-1.c
index 1cfa840a0db..c65d0364b65 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960317-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960317-1.c
@@ -17,7 +17,8 @@  auf:
   return 1;
 }
 
-main ()
+int
+main (void)
 {
   if (f (0, -1))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960321-1.c b/gcc/testsuite/gcc.c-torture/execute/960321-1.c
index 871cc423aaf..f020cb77afc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960321-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960321-1.c
@@ -9,7 +9,8 @@  acc_a (long i)
   return a[i-2000000000L];
 }
 
-main ()
+int
+main (void)
 {
   if (acc_a (2000000000L) != 'd')
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960326-1.c b/gcc/testsuite/gcc.c-torture/execute/960326-1.c
index 8b36085f0a0..0982739e5bc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960326-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960326-1.c
@@ -11,7 +11,8 @@  struct s
 
 struct s s = { .b = 3, .d = {2,0,0} };
 
-main ()
+int
+main (void)
 {
   if (s.b != 3)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960327-1.c b/gcc/testsuite/gcc.c-torture/execute/960327-1.c
index 05893c3e459..559d317cd71 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960327-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960327-1.c
@@ -3,12 +3,14 @@ 
 void abort (void);
 void exit (int);
 
-g ()
+int
+g (void)
 {
   return '\n';
 }
 
-f ()
+void
+f (void)
 {
   char s[] = "abcedfg012345";
   char *sp = s + 12;
@@ -27,7 +29,8 @@  f ()
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/960405-1.c b/gcc/testsuite/gcc.c-torture/execute/960405-1.c
index 01513031d62..cd3ba4fbe7a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960405-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960405-1.c
@@ -6,7 +6,8 @@  void exit (int);
 long double x = X + X;
 long double y = 2.0L * X;
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   if (x != y)
diff --git a/gcc/testsuite/gcc.c-torture/execute/960416-1.c b/gcc/testsuite/gcc.c-torture/execute/960416-1.c
index dce5c1b1da5..d877827edc3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960416-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960416-1.c
@@ -51,7 +51,8 @@  f (t afh, t bfh) \
 df(f_le, t_le)
 df(f_be, t_be)
 
-main ()
+int
+main (void)
 {
   t_be x;
   x.s.h = 0x10000000U;
diff --git a/gcc/testsuite/gcc.c-torture/execute/960419-1.c b/gcc/testsuite/gcc.c-torture/execute/960419-1.c
index 1f8737f3b1d..6cecc054bc7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960419-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960419-1.c
@@ -11,7 +11,8 @@  check(x)
     abort();
 }
 
-main()
+int
+main(void)
 {
   int *p = &i;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/960419-2.c b/gcc/testsuite/gcc.c-torture/execute/960419-2.c
index 71458121ff0..00b2ec719fa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960419-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960419-2.c
@@ -3,7 +3,8 @@  void exit (int);
 
 #define SIZE 8
 
-main()
+int
+main(void)
 {
   int a[SIZE] = {1};
   int i;
diff --git a/gcc/testsuite/gcc.c-torture/execute/960512-1.c b/gcc/testsuite/gcc.c-torture/execute/960512-1.c
index 2f415790c8d..928cb42bad6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960512-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960512-1.c
@@ -12,7 +12,8 @@  double f ()
   return c;
 }
 
-main ()
+int
+main (void)
 {
   __complex__ double c;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/960513-1.c b/gcc/testsuite/gcc.c-torture/execute/960513-1.c
index 77132ec3733..cbd820ae8e7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960513-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960513-1.c
@@ -20,7 +20,8 @@  f (d, i)
   return d;
 }
 
-main ()
+int
+main (void)
 {
   if (! (int) (f (2.0L, 1)))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960521-1.c b/gcc/testsuite/gcc.c-torture/execute/960521-1.c
index 0174e7be552..93d120d5042 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960521-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960521-1.c
@@ -10,7 +10,8 @@  int n;
 #else
 #define BLOCK_SIZE 32768
 #endif
-foo ()
+void
+foo (void)
 {
   int i;
   for (i = 0; i < n; i++)
@@ -19,7 +20,8 @@  foo ()
     b[i] = -1;
 }
 
-main ()
+int
+main (void)
 {
   n = BLOCK_SIZE;
   a = malloc (n * sizeof(*a));
diff --git a/gcc/testsuite/gcc.c-torture/execute/960608-1.c b/gcc/testsuite/gcc.c-torture/execute/960608-1.c
index 1970b42c677..e20801d51a0 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960608-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960608-1.c
@@ -10,6 +10,7 @@  typedef struct
   unsigned char e  : 1;
 } a_struct;
 
+int
 foo (flags)
      a_struct *flags;
 {
@@ -20,7 +21,8 @@  foo (flags)
 	  || flags->b != 3);
 }
 
-main ()
+int
+main (void)
 {
   a_struct flags;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/960801-1.c b/gcc/testsuite/gcc.c-torture/execute/960801-1.c
index 2893365df02..e1b7f8b17fc 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960801-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960801-1.c
@@ -25,7 +25,8 @@  g ()
   return ul;
 }
 
-main ()
+int
+main (void)
 {
   if (f () != (unsigned short) -1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/960802-1.c b/gcc/testsuite/gcc.c-torture/execute/960802-1.c
index fa33a7e4410..04d10a79b86 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960802-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960802-1.c
@@ -30,7 +30,8 @@  f4 ()
   f3 (v);
 }
 
-main ()
+int
+main (void)
 {
   f4 ();
   if (val != 0x5e000132)
diff --git a/gcc/testsuite/gcc.c-torture/execute/960909-1.c b/gcc/testsuite/gcc.c-torture/execute/960909-1.c
index 4d5d00a1124..2350026549b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/960909-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/960909-1.c
@@ -16,6 +16,7 @@  ffs (x)
   return bit;
 }
 
+void
 f (x)
      int x;
 {
@@ -25,7 +26,8 @@  f (x)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f (1);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/961004-1.c b/gcc/testsuite/gcc.c-torture/execute/961004-1.c
index 50e2bdcbdef..c8752b69805 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961004-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961004-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int k = 0;
 
-main()
+int
+main(void)
 {
   int i;
   int j;
diff --git a/gcc/testsuite/gcc.c-torture/execute/961017-1.c b/gcc/testsuite/gcc.c-torture/execute/961017-1.c
index c9f060fd703..36e57e9ac56 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961017-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961017-1.c
@@ -1,6 +1,7 @@ 
 void exit (int);
 
-main ()
+int
+main (void)
 {
   unsigned char z = 0;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/961017-2.c b/gcc/testsuite/gcc.c-torture/execute/961017-2.c
index e56472a1033..80014e118a4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961017-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961017-2.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   int i = 0;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/961026-1.c b/gcc/testsuite/gcc.c-torture/execute/961026-1.c
index 289b7ae2276..c8a6e7f6b59 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961026-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961026-1.c
@@ -10,7 +10,8 @@  test (arg)
   return -1;
 }
 
-main ()
+int
+main (void)
 {
   if (test (0) != 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/961122-1.c b/gcc/testsuite/gcc.c-torture/execute/961122-1.c
index 93c7ae4762e..910cf7e5925 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961122-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961122-1.c
@@ -3,17 +3,20 @@  void exit (int);
 
 long long acc;
 
+void
 addhi (short a)
 {
   acc += (long long) a << 32;
 }
 
+void
 subhi (short a)
 {
   acc -= (long long) a << 32;
 }
 
-main ()
+int
+main (void)
 {
   acc = 0xffff00000000ll;
   addhi (1);
diff --git a/gcc/testsuite/gcc.c-torture/execute/961122-2.c b/gcc/testsuite/gcc.c-torture/execute/961122-2.c
index 53cd42a17ac..2fd3ef2e44e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961122-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961122-2.c
@@ -7,7 +7,8 @@  f (int a)
   return ((a >= 0 && a <= 10) && ! (a >= 0));
 }
 
-main ()
+int
+main (void)
 {
   if (f (0))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/961125-1.c b/gcc/testsuite/gcc.c-torture/execute/961125-1.c
index 7a8e18edfd7..bd4bf0eb8ee 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961125-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961125-1.c
@@ -26,7 +26,8 @@  begfield (int tab, char *ptr, char *lim, int sword, int schar)
   return ptr;
 }
 
-main ()
+int
+main (void)
 {
   char *s = ":ab";
   char *lim = s + 3;
diff --git a/gcc/testsuite/gcc.c-torture/execute/961206-1.c b/gcc/testsuite/gcc.c-torture/execute/961206-1.c
index e8e86be25cc..4e2fb5d1b8d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961206-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961206-1.c
@@ -37,7 +37,8 @@  sub4 (unsigned long long i)
     return 1;
 }
 
-main()
+int
+main(void)
 {
   if (sub1 (0x80000000ULL))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/961213-1.c b/gcc/testsuite/gcc.c-torture/execute/961213-1.c
index b79d1998df5..99cbb6fa365 100644
--- a/gcc/testsuite/gcc.c-torture/execute/961213-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/961213-1.c
@@ -11,7 +11,8 @@  g (unsigned long long int *v, int n, unsigned int a[], int b)
   return n;
 }
 
-main ()
+int
+main (void)
 {
   int res;
   unsigned int ar[] = { 10, 11, 12, 13, 14 };
diff --git a/gcc/testsuite/gcc.c-torture/execute/970214-1.c b/gcc/testsuite/gcc.c-torture/execute/970214-1.c
index 18a24988e67..bd5f500781f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/970214-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/970214-1.c
@@ -1,7 +1,8 @@ 
 void exit (int);
 
 #define L 1
-main ()
+int
+main (void)
 {
   exit (L'1' != L'1');
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/970214-2.c b/gcc/testsuite/gcc.c-torture/execute/970214-2.c
index a4d577d4c65..2a692e88915 100644
--- a/gcc/testsuite/gcc.c-torture/execute/970214-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/970214-2.c
@@ -1,7 +1,8 @@ 
 void exit (int);
 
 #define m(L) (L'1' + (L))
-main ()
+int
+main (void)
 {
   exit (m (0) != L'1');
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/970217-1.c b/gcc/testsuite/gcc.c-torture/execute/970217-1.c
index 1d9939b38fb..8a49c7c45d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/970217-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/970217-1.c
@@ -1,11 +1,13 @@ 
 void exit (int);
 
+int
 sub (int i, int array[i++])
 {
   return i;
 }
 
-main()
+int
+main(void)
 {
   int array[10];
   exit (sub (10, array) != 11);
diff --git a/gcc/testsuite/gcc.c-torture/execute/970923-1.c b/gcc/testsuite/gcc.c-torture/execute/970923-1.c
index a8fd901d343..27b4611444b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/970923-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/970923-1.c
@@ -21,8 +21,8 @@  tu(a)
     return 0;
 }
 
-
-main()
+int
+main(void)
 {
   if (ts (0) || tu (0))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/980223.c b/gcc/testsuite/gcc.c-torture/execute/980223.c
index 73f03e87fe0..62a7cbcc2cb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980223.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980223.c
@@ -24,7 +24,8 @@  int nil;
 object cons1[2] = { {(char *) &nil, 0}, {(char *) &nil, 0} };
 object cons2[2] = { {(char *) &cons1, 64}, {(char *) &nil, 0} };
 
-main()
+int
+main(void)
 {
   object x = {(char *) &cons2, 64};
   object y = {(char *) &nil, 0};
diff --git a/gcc/testsuite/gcc.c-torture/execute/980506-1.c b/gcc/testsuite/gcc.c-torture/execute/980506-1.c
index aaeac6088dc..6d8212649eb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980506-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980506-1.c
@@ -20,7 +20,8 @@  blah:
     goto foo;
 }
 
-main()
+int
+main(void)
 {
   struct decision *p = 0;
   clear_modes (p);
diff --git a/gcc/testsuite/gcc.c-torture/execute/980506-2.c b/gcc/testsuite/gcc.c-torture/execute/980506-2.c
index 7d7ccddcbbf..1985e591784 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980506-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980506-2.c
@@ -16,7 +16,8 @@  f()
   return sp->i+1;
 }
 
-main()
+int
+main(void)
 {
   if (f () != 1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/980506-3.c b/gcc/testsuite/gcc.c-torture/execute/980506-3.c
index 34df519fa08..a9b12fc9b5f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980506-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980506-3.c
@@ -9,9 +9,9 @@  build_lookup (pattern)
 {
   int m;
 
-  m = strlen (pattern) - 1;
+  m = __builtin_strlen (pattern) - 1;
   
-  memset (lookup_table, ++m, 257);
+  __builtin_memset (lookup_table, ++m, 257);
   return m;
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/980526-3.c b/gcc/testsuite/gcc.c-torture/execute/980526-3.c
index e5aeb6aed54..f435616c785 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980526-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980526-3.c
@@ -11,7 +11,8 @@  unsigned int y;
      return 1;
 }
  
-main()
+int
+main(void)
 {
  unsigned int i, j, k, l;
  i = 5; j = 2; k=0; l=2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/980602-1.c b/gcc/testsuite/gcc.c-torture/execute/980602-1.c
index f029ffb8eb4..c32869b928d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980602-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980602-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   int i;
   for (i = 1; i < 100; i++)
diff --git a/gcc/testsuite/gcc.c-torture/execute/980604-1.c b/gcc/testsuite/gcc.c-torture/execute/980604-1.c
index 2346c941f9b..ac389539d62 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980604-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980604-1.c
@@ -7,7 +7,8 @@  int b = -1;
 int c = 1;
 int d = 0;
 
-main ()
+int
+main (void)
 {
   double e;
   double f;
diff --git a/gcc/testsuite/gcc.c-torture/execute/980605-1.c b/gcc/testsuite/gcc.c-torture/execute/980605-1.c
index 36274e06fe8..58814660423 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980605-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980605-1.c
@@ -10,7 +10,7 @@  void exit (int);
 #endif
 
 __inline__ static int
-dummy (x)
+dummy (int x)
 {
   int y;
   y = (long) (x * 4711.3);
@@ -76,7 +76,8 @@  f ()
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/980701-1.c b/gcc/testsuite/gcc.c-torture/execute/980701-1.c
index 6b3761747f7..bb6a0b46538 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980701-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980701-1.c
@@ -1,6 +1,7 @@ 
 void abort (void);
 void exit (int);
 
+int
 ns_name_skip (unsigned char **x, unsigned char *y)
 {
   *x = 0;
@@ -17,7 +18,8 @@  int dn_skipname(unsigned char *ptr, unsigned char *eom) {
     return (ptr - saveptr);
 }
 
-main()
+int
+main(void)
 {
   if (dn_skipname (&a[0], &a[1]) == 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/980709-1.c b/gcc/testsuite/gcc.c-torture/execute/980709-1.c
index 9fda00ea103..6861ff1e22a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/980709-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/980709-1.c
@@ -4,7 +4,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   volatile double a;
   double c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/990117-1.c b/gcc/testsuite/gcc.c-torture/execute/990117-1.c
index 29c0621b1d2..c390ea4c31e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990117-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990117-1.c
@@ -9,7 +9,8 @@  foo (int x, int y, int i, int j)
   return tmp1 < tmp2;
 }
 
-main ()
+int
+main (void)
 {
   if (foo (2, 24, 3, 4) == 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/990127-1.c b/gcc/testsuite/gcc.c-torture/execute/990127-1.c
index 8b572a7ce90..f8eee7030b5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990127-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990127-1.c
@@ -1,7 +1,8 @@ 
 extern void abort (void);
 extern void exit (int);
 
-main()
+int
+main(void)
 {
     int a,b,c;
     int *pa, *pb, *pc;
diff --git a/gcc/testsuite/gcc.c-torture/execute/990128-1.c b/gcc/testsuite/gcc.c-torture/execute/990128-1.c
index f44efe6e8e9..ee7c608676a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990128-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990128-1.c
@@ -11,7 +11,8 @@  int count = 0;
 void sub( struct s *p, struct s **pp );
 int look( struct s *p, struct s **pp );
 
-main()
+int
+main(void)
 {
     struct s *pp;
     struct s *next;
diff --git a/gcc/testsuite/gcc.c-torture/execute/990130-1.c b/gcc/testsuite/gcc.c-torture/execute/990130-1.c
index 123b355c3ae..485d24a5c72 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990130-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990130-1.c
@@ -17,7 +17,8 @@  foo(void)
   asm("" : "+r"(*bar()));
 }
 
-main()
+int
+main(void)
 {
   foo();
   if (count != 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/990324-1.c b/gcc/testsuite/gcc.c-torture/execute/990324-1.c
index c52f74ac2b5..e275c8e6f09 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990324-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990324-1.c
@@ -9,7 +9,8 @@  void f(long i)
     exit (0);
 }
 
-main()
+int
+main(void)
 {
   f(0xffffff01);
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/990524-1.c b/gcc/testsuite/gcc.c-torture/execute/990524-1.c
index 8a2cc12fa7e..f67546e1698 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990524-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990524-1.c
@@ -22,7 +22,8 @@  void loop (char * pz, char * pzDta)
     abort ();
 }
 
-main()
+int
+main(void)
 {
   loop (a, b);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/990531-1.c b/gcc/testsuite/gcc.c-torture/execute/990531-1.c
index cedafbbdf76..85fc1ce9b50 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990531-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990531-1.c
@@ -14,7 +14,8 @@  void exit (int);
        return data.word;
    }
 
-main()
+int
+main(void)
 {
   /* XXX This test could be generalized.  */
   if (sizeof (long) != 4)
diff --git a/gcc/testsuite/gcc.c-torture/execute/990628-1.c b/gcc/testsuite/gcc.c-torture/execute/990628-1.c
index e010510cd50..d6f65686c51 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990628-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/990628-1.c
@@ -23,7 +23,7 @@  fetch()
 {
     static int fetch_count;
 
-    memset(&data_tmp, 0x55, sizeof(data_tmp));
+    __builtin_memset(&data_tmp, 0x55, sizeof(data_tmp));
     sqlca.sqlcode = (++fetch_count > 1 ? 100 : 0);
 }
 
@@ -34,7 +34,7 @@  load_data() {
     int num = num_records();
 
     data_ptr = malloc(num * sizeof(struct data_record));
-    memset(data_ptr, 0xaa, num * sizeof(struct data_record));
+    __builtin_memset(data_ptr, 0xaa, num * sizeof(struct data_record));
 
     fetch();
     p = data_ptr;
@@ -44,8 +44,8 @@  load_data() {
     }
 }
 
-
-main()
+int
+main(void)
 {
     load_data();
     if (sizeof (int) == 2 && data_ptr[0].dummy != 0x5555)
diff --git a/gcc/testsuite/gcc.c-torture/execute/991019-1.c b/gcc/testsuite/gcc.c-torture/execute/991019-1.c
index f23b3d122fa..89d3493db02 100644
--- a/gcc/testsuite/gcc.c-torture/execute/991019-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/991019-1.c
@@ -13,7 +13,8 @@  material_type foo(double x)
      return m;
 }
 
-main()
+int
+main(void)
 {
   int i;
   material_type x;
diff --git a/gcc/testsuite/gcc.c-torture/execute/991023-1.c b/gcc/testsuite/gcc.c-torture/execute/991023-1.c
index 7f348e11b9c..6bc9725ec9f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/991023-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/991023-1.c
@@ -2,7 +2,9 @@  void abort (void);
 void exit (int);
 
 int blah;
-foo()
+
+int
+foo(void)
 {
   int i;
 
@@ -16,8 +18,8 @@  foo()
   return blah;
 }
 
-
-main()
+int
+main(void)
 {
   if (foo () != 0xfcc)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/991112-1.c b/gcc/testsuite/gcc.c-torture/execute/991112-1.c
index 0882fd69a7f..aeb1a334440 100644
--- a/gcc/testsuite/gcc.c-torture/execute/991112-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/991112-1.c
@@ -2,6 +2,7 @@ 
    Reported by Jim Meyering; distilled from bash.  */
 
 void abort(void);
+int isprint (int);
 
 int rl_show_char (int c) { return 0; }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/991118-1.c b/gcc/testsuite/gcc.c-torture/execute/991118-1.c
index 0645e0dfb90..e7281d9b71c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/991118-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/991118-1.c
@@ -58,7 +58,8 @@  struct tmp2 tmp2 = {0x123456789ABCDLL, 0x123};
 struct tmp3 tmp3 = {0x123, 0x1FFFF00000000LL};
 struct tmp4 tmp4 = {0x1FFFF00000000LL, 0x123};
 
-main()
+int
+main(void)
 {
 
   if (sizeof (long long) != 8)
diff --git a/gcc/testsuite/gcc.c-torture/execute/alias-1.c b/gcc/testsuite/gcc.c-torture/execute/alias-1.c
index 666e96f968a..d542f23b3b5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/alias-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/alias-1.c
@@ -1,15 +1,17 @@ 
 int val;
 
 int *ptr = &val;
-float *ptr2 = &val;
+float *ptr2 = (float *) &val;
 
 __attribute__((optimize ("-fno-strict-aliasing")))
-typepun ()
+void
+typepun (void)
 {
   *ptr2=0;
 }
 
-main()
+int
+main(void)
 {
   *ptr=1;
   typepun ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/alias-2.c b/gcc/testsuite/gcc.c-torture/execute/alias-2.c
index 6aeb0c23e86..8bc5473ed35 100644
--- a/gcc/testsuite/gcc.c-torture/execute/alias-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/alias-2.c
@@ -3,7 +3,8 @@ 
 int a[10]={};
 extern int b[10] __attribute__ ((alias("a")));
 int off;
-main()
+int
+main(void)
 {
   b[off]=1;
   a[off]=2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/alias-3.c b/gcc/testsuite/gcc.c-torture/execute/alias-3.c
index 270ac42b619..bcd845b5120 100644
--- a/gcc/testsuite/gcc.c-torture/execute/alias-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/alias-3.c
@@ -3,7 +3,7 @@ 
 static int a=0;
 extern int b __attribute__ ((alias("a")));
 __attribute__ ((noinline))
-static inc()
+static void inc(void)
 {
   b++;
 }
diff --git a/gcc/testsuite/gcc.c-torture/execute/alias-4.c b/gcc/testsuite/gcc.c-torture/execute/alias-4.c
index 6c6c9587b45..43503418f76 100644
--- a/gcc/testsuite/gcc.c-torture/execute/alias-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/alias-4.c
@@ -3,6 +3,7 @@  int a = 1;
 extern int b __attribute__ ((alias ("a")));
 int c = 1;
 extern int d __attribute__ ((alias ("c")));
+int
 main (int argc)
 {
   int *p;
diff --git a/gcc/testsuite/gcc.c-torture/execute/arith-1.c b/gcc/testsuite/gcc.c-torture/execute/arith-1.c
index e991d8e6640..a45c1c89ba8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/arith-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/arith-1.c
@@ -36,7 +36,9 @@  sat_add4 (unsigned i)
     return ret;
   return i;
 }
-main ()
+
+int
+main (void)
 {
   if (sat_add (~0U) != ~0U)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c b/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c
index c3fdedf9fa6..7bc6d190211 100644
--- a/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c
+++ b/gcc/testsuite/gcc.c-torture/execute/arith-rand-ll.c
@@ -41,7 +41,8 @@  random_bitstring ()
 
 #define ABS(x) ((x) >= 0 ? (x) : -(x))
 
-main ()
+int
+main (void)
 {
   long long int i;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/arith-rand.c b/gcc/testsuite/gcc.c-torture/execute/arith-rand.c
index a6b53ebb131..30ae4aea00c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/arith-rand.c
+++ b/gcc/testsuite/gcc.c-torture/execute/arith-rand.c
@@ -41,7 +41,8 @@  random_bitstring ()
 
 #define ABS(x) ((x) >= 0 ? (x) : -(x))
 
-main ()
+int
+main (void)
 {
   long int i;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c b/gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c
index c359a7dd077..e721bf7de86 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf-layout-1.c
@@ -4,7 +4,8 @@  void exit (int);
 struct { long f8:8; long f24:24; } a;
 struct { long f32:32; } b;
 
-main ()
+int
+main (void)
 {
   if (sizeof (a) != sizeof (b))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c b/gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c
index 9c4e17e03f6..1ad1e20d592 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf-pack-1.c
@@ -7,6 +7,7 @@  struct foo
   unsigned long whole:32 __attribute__ ((packed));
 };
 
+void
 f (struct foo *q)
 {
   if (q->half != 0x1234)
@@ -15,7 +16,8 @@  f (struct foo *q)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   struct foo bar;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c b/gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c
index 81c7fd975bc..fc225750007 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf-sign-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   struct  {
     signed int s:3;
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c b/gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c
index 31581ef7aac..c7db5113a26 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf-sign-2.c
@@ -29,7 +29,8 @@  struct X {
 
 struct X x;
 
-main ()
+int
+main (void)
 {
   if ((x.u3 - 2) >= 0)		/* promoted value should be signed */
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/bf64-1.c b/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
index a4396910816..a795488f2d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/bf64-1.c
@@ -29,7 +29,8 @@  sub2 (struct tmp2 tmp2)
   return tmp2;
 }
 
-main()
+int
+main(void)
 {
   struct tmp tmp = {0x123, 0xFFF000FFF000FLL};
   struct tmp2 tmp2 = {0xFFF000FFF000FLL, 0x123};
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c
index 19f9eaa0c4b..f6208002e9d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-2.c
@@ -9,7 +9,7 @@  int glob_int_arr[100];
 int *glob_ptr_int = glob_int_arr;
 int glob_int = 4;
 
-static stat_int_arr[100];
+static int stat_int_arr[100];
 static int *stat_ptr_int = stat_int_arr;
 static int stat_int;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c
index bd186f5bd0d..af990d14221 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtin-prefetch-3.c
@@ -13,7 +13,7 @@  volatile int *glob_ptr_vol_int = glob_vol_int_arr;
 volatile int * volatile glob_vol_ptr_vol_int = glob_vol_int_arr;
 volatile int glob_vol_int;
 
-static stat_int_arr[100];
+static int stat_int_arr[100];
 static volatile int stat_vol_int_arr[100];
 static int * volatile stat_vol_ptr_int = stat_int_arr;
 static volatile int *stat_ptr_vol_int = stat_vol_int_arr;
diff --git a/gcc/testsuite/gcc.c-torture/execute/cbrt.c b/gcc/testsuite/gcc.c-torture/execute/cbrt.c
index 552814f7933..63167bf5564 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cbrt.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cbrt.c
@@ -83,7 +83,8 @@  cbrtl (double x)
   return lt;
 }
 
-main ()
+int
+main (void)
 {
   if ((int) (cbrtl (27.0) + 0.5) != 3)
     abort ();
@@ -91,5 +92,5 @@  main ()
   exit (0);
 }
 #else
-main () { exit (0); }
+int main (void) { exit (0); }
 #endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-1.c b/gcc/testsuite/gcc.c-torture/execute/complex-1.c
index 0721583742a..46a9a16ff89 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-1.c
@@ -30,7 +30,8 @@  xcexp (__complex__ double x)
   return x;
 }
 
-main ()
+int
+main (void)
 {
   __complex__ double x;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-2.c b/gcc/testsuite/gcc.c-torture/execute/complex-2.c
index 68ce8616bf3..cd4b25f6d1f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-2.c
@@ -11,7 +11,8 @@  f (__complex__ double x, __complex__ double y)
 __complex__ double ag = 1.0 + 1.0i;
 __complex__ double bg = -2.0 + 2.0i;
 
-main ()
+int
+main (void)
 {
   __complex__ double a, b, c;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-3.c b/gcc/testsuite/gcc.c-torture/execute/complex-3.c
index 1e4cd58e2fb..db119e24639 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-3.c
@@ -18,7 +18,8 @@  f (float a, float b)
   return c;
 }
 
-main ()
+int
+main (void)
 {
   struct complex z = f (1.0, 0.0);
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-4.c b/gcc/testsuite/gcc.c-torture/execute/complex-4.c
index 22b4ca3aba3..10dfa076126 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-4.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   if ((__complex__ double) 0.0 != (__complex__ double) (-0.0))
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-5.c b/gcc/testsuite/gcc.c-torture/execute/complex-5.c
index 48a38a16178..6ba5d47e14d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-5.c
@@ -12,7 +12,8 @@  float __complex__  y = 7.0 + 5.0 * (1.0fi);
 float __complex__  w = 8.0 + 19.0 * (1.0fi);
 float __complex__  z;
 
-main ()
+int
+main (void)
 {
 
   z = p (x,y);
diff --git a/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c b/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
index 9d3043be24a..99ec691b23b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/compndlit-1.c
@@ -18,7 +18,8 @@  struct S
 
 struct S x = {1, 1, 1};
 
-main ()
+int
+main (void)
 {
   x = (struct S) {b:0, a:0, c:({ struct S o = x; o.a == 1 ? 10 : 20;})};
   if (x.c != 10)
diff --git a/gcc/testsuite/gcc.c-torture/execute/conversion.c b/gcc/testsuite/gcc.c-torture/execute/conversion.c
index 31dcafc4842..2f5ea6d15ff 100644
--- a/gcc/testsuite/gcc.c-torture/execute/conversion.c
+++ b/gcc/testsuite/gcc.c-torture/execute/conversion.c
@@ -74,6 +74,7 @@  ldnear (long double x, long double y)
   return t == 0 || x / t > 100000000000000000000000000000000.0;
 }
 
+void
 test_integer_to_float()
 {
   if (u2f(0U) != (float) 0U)				/* 0 */
@@ -174,6 +175,7 @@  sll2ld(s)
   return s;
 }
 
+void
 test_longlong_integer_to_float()
 {
   if (ull2f(0ULL) != (float) 0ULL)			/* 0 */
@@ -277,6 +279,7 @@  ld2s(long double d)
   return (int) d;
 }
 
+void
 test_float_to_integer()
 {
   if (f2u(0.0) != 0)
@@ -432,6 +435,7 @@  ld2sll(long double d)
   return (long long int) d;
 }
 
+void
 test_float_to_longlong_integer()
 {
   if (f2ull(0.0) != 0LL)
@@ -530,7 +534,8 @@  test_float_to_longlong_integer()
 }
 #endif
 
-main()
+int
+main(void)
 {
   test_integer_to_float();
   test_float_to_integer();
diff --git a/gcc/testsuite/gcc.c-torture/execute/cvt-1.c b/gcc/testsuite/gcc.c-torture/execute/cvt-1.c
index 647f51738a3..d0378906a82 100644
--- a/gcc/testsuite/gcc.c-torture/execute/cvt-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/cvt-1.c
@@ -21,7 +21,8 @@  f (long i)
   return g2 (i);
 }
 
-main ()
+int
+main (void)
 {
   if (f (123456789L) != 123456789L)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/divconst-1.c b/gcc/testsuite/gcc.c-torture/execute/divconst-1.c
index d7992f69928..95eee716901 100644
--- a/gcc/testsuite/gcc.c-torture/execute/divconst-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/divconst-1.c
@@ -6,6 +6,7 @@  typedef struct
   unsigned a, b, c, d;
 } t1;
 
+void
 f (t1 *ps)
 {
     ps->a = 10000;
@@ -14,7 +15,8 @@  f (t1 *ps)
     ps->d = ps->c / 3;
 }
 
-main ()
+int
+main (void)
 {
   t1 s;
   f (&s);
diff --git a/gcc/testsuite/gcc.c-torture/execute/divconst-2.c b/gcc/testsuite/gcc.c-torture/execute/divconst-2.c
index 17590568445..3464ae1210a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/divconst-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/divconst-2.c
@@ -28,7 +28,8 @@  long nums[] =
   -1L, 0x7fffffffL, -0x7fffffffL - 1L
 };
 
-main ()
+int
+main (void)
 {
   int i;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/divconst-3.c b/gcc/testsuite/gcc.c-torture/execute/divconst-3.c
index 8febc7f449b..12b38fd80b8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/divconst-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/divconst-3.c
@@ -7,7 +7,8 @@  f (long long x)
   return x / 10000000000LL;
 }
 
-main ()
+int
+main (void)
 {
   if (f (10000000000LL) != 1 || f (100000000000LL) != 10)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/enum-1.c b/gcc/testsuite/gcc.c-torture/execute/enum-1.c
index 3d513cc36bc..20ff88eb059 100644
--- a/gcc/testsuite/gcc.c-torture/execute/enum-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/enum-1.c
@@ -37,7 +37,8 @@  atom ()
     return 0;
 }
 
-main ()
+int
+main (void)
 {
   tok = 0;
   if (atom () != 1)
diff --git a/gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c b/gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c
index a4f2f7d4f34..5d0df69a123 100644
--- a/gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/func-ptr-1.c
@@ -4,7 +4,8 @@  void exit (int);
 static double f (float a);
 static double (*fp) (float a);
 
-main ()
+int
+main (void)
 {
   fp = f;
   if (fp ((float) 1) != 1.0)
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c
index 8a6bff39b79..c4a15242156 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20011123-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   double db1 = 1.7976931348623157e+308;
   long double ldb1 = db1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c
index ba380b3a8c7..cea13971bd1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/920518-1.c
@@ -2,7 +2,8 @@  void abort (void);
 void exit (int);
 
 unsigned u=2147483839;float f0=2147483648e0,f1=2147483904e0;
-main()
+int
+main(void)
 {
   float f=u;
   if(f==f0)
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c
index e980c6df35d..00dbc5ef771 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.c
@@ -2,4 +2,4 @@ 
 void abort (void);
 void exit (int);
 double normalize(x)double x;{if(x==0)x=0;return x;}
-main(){char b[9];sprintf(b,"%g",normalize(-0.0));if(strcmp(b,"0"))abort();exit(0);}
+int main(void){char b[9];sprintf(b,"%g",normalize(-0.0));if(__builtin_strcmp(b,"0"))abort();exit(0);}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c
index 92407762a24..24b057ec9cd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/930529-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   union {
     double d;
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c
index e1329c84b0d..7780b8c152f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-1.c
@@ -13,7 +13,8 @@  void leave ()
   exit (0);
 }
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   /* Move this line earlier, for architectures (like alpha) that issue 
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c
index b19fa3760e1..b1b5c7dc765 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-2.c
@@ -13,7 +13,8 @@  void leave ()
   exit (0);
 }
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   /* Move this line earlier, for architectures (like alpha) that issue 
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c
index 4caa08a0530..e6b77345098 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-3.c
@@ -13,7 +13,8 @@  void leave ()
   exit (0);
 }
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   /* Move this line earlier, for architectures (like alpha) that issue 
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c
index c2a51c3b84b..0c5f67aea57 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-6.c
@@ -6,7 +6,8 @@  extern void link_error (void);
 extern void abort (void);
 extern void exit (int);
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   /* NaN is an IEEE unordered operand.  All these test should be false.  */
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-9.c b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-9.c
index 7269b81d7ca..6352dddec61 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-9.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/fp-cmp-9.c
@@ -6,7 +6,8 @@  extern void link_error (void);
 extern void abort (void);
 extern void exit (int);
 
-main ()
+int
+main (void)
 {
 #if ! defined (__vax__) && ! defined (_CRAY)
   /* NaN is an IEEE unordered operand.  All these test should be false.  */
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c b/gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c
index 83472f1a9ff..9fd549d07e9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/minuszero.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   union
     {
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c
index a252dd30a2d..65facaff51f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero2.c
@@ -21,11 +21,13 @@  expect (double value, double expected)
   else if (value != value)
     abort ();			/* actual value is a NaN */
 
-  else if (memcmp ((void *)&value, (void *)&expected, sizeof (double)) != 0)
+  else if (__builtin_memcmp ((void *)&value, (void *)&expected,
+			     sizeof (double)) != 0)
     abort ();			/* values don't match */
 }
 
-main ()
+int
+main (void)
 {
   expect (pzero + pzero, pzero);
   expect (pzero + nzero, pzero);
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c
index 3ae0af666e5..46cab4664d5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero3.c
@@ -16,7 +16,8 @@  void expectf (float, float);
 double negd (double);
 float negf (float);
 
-main ()
+int
+main (void)
 {
   expectd (negd (zerod), nzerod);
   expectf (negf (zerof), nzerof);
@@ -29,7 +30,8 @@  void
 expectd (double value, double expected)
 {
   if (value != expected
-      || memcmp ((void *)&value, (void *) &expected, sizeof (double)) != 0)
+      || __builtin_memcmp ((void *)&value, (void *) &expected,
+			   sizeof (double)) != 0)
     abort ();
 }
 
@@ -37,7 +39,8 @@  void
 expectf (float value, float expected)
 {
   if (value != expected
-      || memcmp ((void *)&value, (void *) &expected, sizeof (float)) != 0)
+      || __builtin_memcmp ((void *)&value, (void *) &expected,
+			   sizeof (float)) != 0)
     abort ();
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero5.c b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero5.c
index cdf605e96bf..6c236394975 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/mzero5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mzero5.c
@@ -6,7 +6,7 @@  int
 negzero_check (double d)
 {
   if (d == 0)
-    return !!memcmp ((void *)&zero, (void *)&d, sizeof (double));
+    return !!__builtin_memcmp ((void *)&zero, (void *)&d, sizeof (double));
   return 0;
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c b/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c
index 8447590be7d..b568097a45e 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/rbug.c
@@ -21,7 +21,8 @@  float s (unsigned long long k)
   return x;
 }
 
-main ()
+int
+main (void)
 {
   unsigned long long int k;
   double x;
diff --git a/gcc/testsuite/gcc.c-torture/execute/index-1.c b/gcc/testsuite/gcc.c-torture/execute/index-1.c
index 9f2d3b8ddea..4ff32ff20d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/index-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/index-1.c
@@ -17,7 +17,8 @@  f (long n)
   return a[n - 100000];
 }
 
-main ()
+int
+main (void)
 {
   if (f (100030L) != 30)
     abort();
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-1.c b/gcc/testsuite/gcc.c-torture/execute/loop-1.c
index 6cf6298f713..c3cc715569b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-1.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   int i, j, k[3];
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-2b.c b/gcc/testsuite/gcc.c-torture/execute/loop-2b.c
index 6bdb86c254b..05776b68c3d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-2b.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-2b.c
@@ -5,6 +5,7 @@  void exit (int);
 
 int a[2];
 
+void
 f (int i)
 {
   for (; i < INT_MAX; i++)
@@ -15,7 +16,8 @@  f (int i)
     }
 }
 
-main ()
+int
+main (void)
 {
   a[0] = a[1] = 0;
   f (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-6.c b/gcc/testsuite/gcc.c-torture/execute/loop-6.c
index 2b624202fc8..d186c2b4200 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-6.c
@@ -1,7 +1,8 @@ 
 void abort (void);
 void exit (int);
 
-main()
+int
+main(void)
 {
   char c;
   char d;
diff --git a/gcc/testsuite/gcc.c-torture/execute/loop-7.c b/gcc/testsuite/gcc.c-torture/execute/loop-7.c
index 64c704bbfca..7112a964839 100644
--- a/gcc/testsuite/gcc.c-torture/execute/loop-7.c
+++ b/gcc/testsuite/gcc.c-torture/execute/loop-7.c
@@ -15,7 +15,8 @@  void foo (unsigned int n)
     abort ();
 }
 
-main()
+int
+main(void)
 {
   foo (64);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c b/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c
index fe1e1771c7f..6bfd7d13a43 100644
--- a/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/lto-tbaa-1.c
@@ -9,13 +9,16 @@  struct c {
   float *b;
 } *c;
 int d;
+void
 use_a (struct a *a)
 {
 }
+void
 set_b (int **a)
 {
   *a=&d;
 }
+void
 use_c (struct c *a)
 {
 }
@@ -28,7 +31,8 @@  struct b b= {&e};
 struct b b2;
 struct b b3;
 int **ptr = &b2.b;
-main ()
+int
+main (void)
 {
   a= (void *)0;
   b.b=&e;
diff --git a/gcc/testsuite/gcc.c-torture/execute/memcpy-1.c b/gcc/testsuite/gcc.c-torture/execute/memcpy-1.c
index 43fbb60cc63..3d9e92cdf56 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memcpy-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memcpy-1.c
@@ -17,7 +17,8 @@  void *copy (void *o, const void *i, unsigned l)
   return memcpy (o, i, l);
 }
 
-main ()
+int
+main (void)
 {
   unsigned i;
   unsigned char src[MEMCPY_SIZE];
diff --git a/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c b/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c
index e330ef1662f..97d90ec9872 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memcpy-2.c
@@ -35,7 +35,8 @@  static union {
   long double align_fp;
 } u1, u2;
 
-main ()
+int
+main (void)
 {
   int off1, off2, len, i;
   char *p, *q, c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c b/gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c
index ee7f6020021..1f2201971f1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memcpy-bi.c
@@ -23,7 +23,8 @@  TN ((n) + 1) \
 TN ((n) + 2) \
 TN ((n) + 3)
 
-main ()
+int
+main (void)
 {
   int i,j;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/memset-1.c b/gcc/testsuite/gcc.c-torture/execute/memset-1.c
index 0da5c9576ef..45f69d61cfd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memset-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memset-1.c
@@ -32,7 +32,8 @@  static union {
 
 char A = 'A';
 
-main ()
+int
+main (void)
 {
   int off, len, i;
   char *p, *q;
diff --git a/gcc/testsuite/gcc.c-torture/execute/memset-2.c b/gcc/testsuite/gcc.c-torture/execute/memset-2.c
index befad1e162b..e42f311c392 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memset-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memset-2.c
@@ -5,6 +5,8 @@ 
 
    Written by Roger Sayle, April 22, 2002.  */
 
+#include <string.h>
+
 void abort (void);
 void exit (int);
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/memset-3.c b/gcc/testsuite/gcc.c-torture/execute/memset-3.c
index f1fa932ce92..9bd920f4a16 100644
--- a/gcc/testsuite/gcc.c-torture/execute/memset-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/memset-3.c
@@ -5,6 +5,8 @@ 
 
    Written by Roger Sayle, July 22, 2002.  */
 
+#include <string.h>
+
 void abort (void);
 void exit (int);
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c b/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
index 762d838d0a5..6d9fbb7b461 100644
--- a/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/nest-stdar-1.c
@@ -3,7 +3,8 @@ 
 void abort (void);
 void exit (int);
 
-main ()
+int
+main (void)
 {
   double f (int x, ...)
     {
diff --git a/gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c b/gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c
index f8a75e8cfa2..af913738113 100644
--- a/gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/nestfunc-1.c
@@ -12,6 +12,7 @@  g (int a, int b, int (*gi) (int, int))
     return b;
 }
 
+void
 f ()
 {
   int i, j;
@@ -24,7 +25,8 @@  f ()
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/packed-1.c b/gcc/testsuite/gcc.c-torture/execute/packed-1.c
index 689592a2ea8..c8e6a47b93f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/packed-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/packed-1.c
@@ -8,6 +8,7 @@  struct
   short i __attribute__ ((packed));
 } t;
 
+void
 f ()
 {
   t.i = x1;
@@ -15,7 +16,8 @@  f ()
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr15262-1.c b/gcc/testsuite/gcc.c-torture/execute/pr15262-1.c
index 4ff613555e3..c6453d98d05 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr15262-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr15262-1.c
@@ -17,7 +17,8 @@  struct A
 
 int foo () { return 3; }
 
-main ()
+int
+main (void)
 {
   struct A loc, *locp;
   float f, g, *p;
@@ -32,7 +33,7 @@  main ()
     g = 1;
 
   /* Store into *locp and cache its current value.  */
-  locp = malloc (sizeof (*locp));
+  locp = __builtin_malloc (sizeof (*locp));
   locp->i = 10;
   T355 = locp->i;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr15262-2.c b/gcc/testsuite/gcc.c-torture/execute/pr15262-2.c
index 3701a657483..6edb444a6d9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr15262-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr15262-2.c
@@ -19,6 +19,7 @@  struct B
 
 float X;
 
+int
 foo (struct B b, struct A *q, float *h)
 {
   X += *h;
@@ -27,7 +28,8 @@  foo (struct B b, struct A *q, float *h)
   return *(b.p);
 }
 
-main()
+int
+main(void)
 {
   struct A a;
   struct B b;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr15262.c b/gcc/testsuite/gcc.c-torture/execute/pr15262.c
index ee743faebaf..3004c479864 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr15262.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr15262.c
@@ -37,7 +37,8 @@  foo(struct A *locp, int i, int str)
   return T355;
 }
 
-main ()
+int
+main (void)
 {
   struct A loc;
   int str;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17252.c b/gcc/testsuite/gcc.c-torture/execute/pr17252.c
index ad45916655e..843277795b7 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr17252.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr17252.c
@@ -5,7 +5,8 @@  void abort (void);
 
 char *a;
 
-main ()
+int
+main (void)
 {
   /* Make 'a' point to itself.  */
   a = (char *)&a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr21331.c b/gcc/testsuite/gcc.c-torture/execute/pr21331.c
index 4d95878e631..36f6903fc0f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr21331.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr21331.c
@@ -9,7 +9,8 @@  foo ()
   if (retval == -1)  return 0;
   return 3;  }
 
-main ()
+int
+main (void)
 { if (foo () != 0)  abort ();
   return 0;  }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr34176.c b/gcc/testsuite/gcc.c-torture/execute/pr34176.c
index 3bbdb22c74c..75c25a57749 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr34176.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr34176.c
@@ -30,7 +30,7 @@  extern void abort (void);
 struct mult_index * __attribute__((noinline))
 foo (size_t n)
 {
-  static count = 0;
+  static int count = 0;
   if (count++ > 0)
     abort ();
   return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr42231.c b/gcc/testsuite/gcc.c-torture/execute/pr42231.c
index 2e46f5f3604..60e935624df 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr42231.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr42231.c
@@ -1,6 +1,6 @@ 
 extern void abort (void);
 
-static max;
+static int max;
 
 static void __attribute__((noinline)) storemax (int i)
 {
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr42614.c b/gcc/testsuite/gcc.c-torture/execute/pr42614.c
index d3680539bdc..979f827a691 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr42614.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr42614.c
@@ -44,9 +44,9 @@  inlined_wrong (TEntry *entry_p, int flag)
 void
 expect_func (int a, unsigned char *b)
 {
-  if (abs ((a == 0)))
+  if (__builtin_abs ((a == 0)))
     abort ();
-  if (abs ((b == 0)))
+  if (__builtin_abs ((b == 0)))
     abort ();
 }
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr54937.c b/gcc/testsuite/gcc.c-torture/execute/pr54937.c
index 13dae6063f9..dc917fd77ab 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr54937.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr54937.c
@@ -5,6 +5,7 @@  int a[1];
 void (*terminate_me)(int);
 
 __attribute__((noinline,noclone))
+void
 t(int c)
 { int i;
   for (i=0;i<c;i++)
@@ -14,7 +15,8 @@  t(int c)
       a[i]=0;
     }
 }
-main()
+int
+main(void)
 {
   terminate_me = exit;
   t(100);
diff --git a/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c b/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c
index e5ac0190635..c439abf6365 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ptr-arith-1.c
@@ -7,7 +7,8 @@  f (char *s, unsigned int i)
   return &s[i + 3 - 1];
 }
 
-main ()
+int
+main (void)
 {
   char *str = "abcdefghijkl";
   char *x2 = f (str, 12);
diff --git a/gcc/testsuite/gcc.c-torture/execute/regstack-1.c b/gcc/testsuite/gcc.c-torture/execute/regstack-1.c
index 7e73106d5e1..5793882465b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/regstack-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/regstack-1.c
@@ -6,7 +6,8 @@  long double U = 1;
 long double Y2 = 11;
 long double Y1 = 17;
 long double X, Y, Z, T, R, S;
-main ()
+int
+main (void)
 {
   X = (C + U) * Y2;
   Y = C - U - U;
diff --git a/gcc/testsuite/gcc.c-torture/execute/scope-1.c b/gcc/testsuite/gcc.c-torture/execute/scope-1.c
index 131803b0d28..80cc6246cb5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/scope-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/scope-1.c
@@ -3,7 +3,8 @@  void exit (int);
 
 int v = 3;
 
-f ()
+void
+f (void)
 {
   int v = 4;
   {
@@ -13,7 +14,8 @@  f ()
   }
 }
 
-main ()
+int
+main (void)
 {
   f ();
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/simd-5.c b/gcc/testsuite/gcc.c-torture/execute/simd-5.c
index 4be89d0346a..321837e64b2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/simd-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/simd-5.c
@@ -48,13 +48,13 @@  main (void)
 {
   func2 ();
 
-  if (memcmp (&w1, &w3, sizeof (Q)) != 0)
+  if (__builtin_memcmp (&w1, &w3, sizeof (Q)) != 0)
     abort ();
-  if (memcmp (&w2, &w4, sizeof (Q)) != 0)
+  if (__builtin_memcmp (&w2, &w4, sizeof (Q)) != 0)
     abort ();
-  if (memcmp (&z1, &z3, sizeof (Q)) != 0)
+  if (__builtin_memcmp (&z1, &z3, sizeof (Q)) != 0)
     abort ();
-  if (memcmp (&z2, &z4, sizeof (Q)) != 0)
+  if (__builtin_memcmp (&z2, &z4, sizeof (Q)) != 0)
     abort ();
 
   return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strcmp-1.c b/gcc/testsuite/gcc.c-torture/execute/strcmp-1.c
index 5f3f3d11ed9..e9151572cdb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strcmp-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strcmp-1.c
@@ -44,7 +44,8 @@  test (const unsigned char *s1, const unsigned char *s2, int expected)
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   size_t off1, off2, len, i;
   unsigned char *buf1, *buf2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strcpy-1.c b/gcc/testsuite/gcc.c-torture/execute/strcpy-1.c
index 1ce809a55a1..ffa27c54ca8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strcpy-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strcpy-1.c
@@ -32,7 +32,8 @@  static union {
   long double align_fp;
 } u1, u2;
 
-main ()
+int
+main (void)
 {
   int off1, off2, len, i;
   char *p, *q, c;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c b/gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c
index e1370a01a90..055232de3bb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c
@@ -15,7 +15,8 @@  check (TRIAL *t)
   return 0;
 }
 
-main ()
+int
+main (void)
 {
   TRIAL trial;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c b/gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c
index e50bb00a8b7..31d613f7f8f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strct-pack-2.c
@@ -7,7 +7,8 @@  typedef struct
   short *ap[2]  __attribute__ ((aligned (2),packed));
 } A;
 
-main ()
+int
+main (void)
 {
   short i, j = 1;
   A a, *ap = &a;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c b/gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c
index 66d09c82fe3..998dc458c9f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strct-pack-4.c
@@ -19,7 +19,8 @@  my_set_b (void)
   return 0x1234;
 }
 
-main ()
+int
+main (void)
 {
   three_char_t three_char;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c b/gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c
index 92f182f7d82..920be6af256 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strct-stdarg-1.c
@@ -12,6 +12,7 @@  struct tiny
   char g;
 };
 
+void
 f (int n, ...)
 {
   struct tiny x;
@@ -41,7 +42,8 @@  f (int n, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   struct tiny x[3];
   x[0].c = 10;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c b/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c
index 6724885d628..509e20cb3b4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strct-varg-1.c
@@ -5,6 +5,7 @@  void exit (int);
 
 struct s { int x, y; };
 
+void
 f (int attr, ...)
 {
   struct s va_values;
@@ -31,7 +32,8 @@  f (int attr, ...)
   va_end (va);
 }
 
-main ()
+int
+main (void)
 {
   struct s a, b;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/strlen-1.c b/gcc/testsuite/gcc.c-torture/execute/strlen-1.c
index bbfe9f3773c..3f8c694668c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strlen-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strlen-1.c
@@ -31,7 +31,8 @@  static union {
   long double align_fp;
 } u;
 
-main ()
+int
+main (void)
 {
   size_t off, len, len2, i;
   char *p;
diff --git a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c b/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
index aa662d1bf8d..3c37556bb6f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/strncmp-1.c
@@ -45,7 +45,8 @@  test (const unsigned char *s1, const unsigned char *s2, size_t len, int expected
     abort ();
 }
 
-main ()
+int
+main (void)
 {
   size_t off1, off2, len, i;
   unsigned char *buf1, *buf2;
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c
index a7dd0129f59..7ab17b65364 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-1.c
@@ -9,7 +9,8 @@  struct S
 
 struct S object = {'X', 8, 9};
 
-main ()
+int
+main (void)
 {
   if (object.f1 != 'X' || object.f2[0] != 8 || object.f2[1] != 9)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
index ebab3731155..5de3c5ce6fa 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-2.c
@@ -8,7 +8,8 @@  struct {
   int c:4;
 } x = { 2,3,4 };
 
-main ()
+int
+main (void)
 {
   if (x.a != 2)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c
index 37ceb6c176c..5220e86d468 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-3.c
@@ -6,7 +6,8 @@  struct
   unsigned int f1:1, f2:1, f3:3, f4:3, f5:2, f6:1, f7:1;
 } result = {1, 1, 7, 7, 3, 1, 1};
 
-main ()
+int
+main (void)
 {
   if ((result.f3 & ~7) != 0 || (result.f4 & ~7) != 0)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c b/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
index 3499bd30670..2685d440626 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ini-4.c
@@ -10,7 +10,8 @@  struct s s = {
   c: {1, 2, 3}
 };
 
-main()
+int
+main(void)
 {
   if (s.c[0] != 1)
     abort ();
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c b/gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c
index 0e5ad2ce458..664e1056c4d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ret-1.c
@@ -44,7 +44,8 @@  X f (B a, char b, double c, B d)
 
 X (*fp) (B, char, double, B) = &f;
 
-main ()
+int
+main (void)
 {
   X Xr;
   char tmp[100];
diff --git a/gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c b/gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c
index 57cf79f6e43..3ba855301a1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/struct-ret-2.c
@@ -19,7 +19,8 @@  g (void)
   return 0x1234;
 }
 
-main ()
+int
+main (void)
 {
   three_byte_t three_byte;
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-1.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-1.c
index d21007d6c70..7bf24532f73 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-1.c
@@ -4,6 +4,7 @@  void abort (void);
 void exit (int);
 
 typedef unsigned long L;
+void
 f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...)
 {
   va_list select;
@@ -20,7 +21,8 @@  f (L p0, L p1, L p2, L p3, L p4, L p5, L p6, L p7, L p8, ...)
   va_end (select);
 }
 
-main ()
+int
+main (void)
 {
   f (1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 0L);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-10.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-10.c
index c52d0b03adc..338728f522d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-10.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-10.c
@@ -226,7 +226,8 @@  f15 (int a1, int a2, int a3, int a4, int a5,
   va_end(ap);
 }
 
-main ()
+int
+main (void)
 {
   char *f = "0123456789abcdef";
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c
index 965c94db9b3..56f8e14fdde 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-2.c
@@ -269,7 +269,8 @@  f15 (int a1, int a2, int a3, int a4, int a5,
   va_end(ap);
 }
 
-main ()
+int
+main (void)
 {
   char *f = "0123456789abcdef";
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-4.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-4.c
index 75295d81f9b..f8c9d65d978 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-4.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-4.c
@@ -27,7 +27,8 @@  f (big x, char *s, ...)
   va_end (ap);
 }
 
-main ()
+int
+main (void)
 {
   static big x = { "abc" };
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-5.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-5.c
index eaa2010fc5c..a908f33b847 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-5.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-5.c
@@ -3,6 +3,7 @@ 
 void abort (void);
 void exit (int);
 
+void
 va_double (int n, ...)
 {
   va_list args;
@@ -21,6 +22,7 @@  va_double (int n, ...)
   va_end (args);
 }
 
+void
 va_long_double (int n, ...)
 {
   va_list args;
@@ -39,7 +41,8 @@  va_long_double (int n, ...)
   va_end (args);
 }
 
-main ()
+int
+main (void)
 {
   va_double (4, 3.141592, 2.71827, 2.2360679, 2.1474836);
   va_long_double (4, 3.141592L, 2.71827L, 2.2360679L, 2.1474836L);
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-6.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-6.c
index 3a3bb4f312d..4cb0bfc9e6d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-6.c
@@ -3,6 +3,7 @@ 
 void abort (void);
 void exit (int);
 
+void
 f (int n, ...)
 {
   va_list args;
@@ -31,7 +32,8 @@  f (int n, ...)
   va_end(args);
 }
 
-main ()
+int
+main (void)
 {
   f (4, 10, 10000000000LL, 11, 3.14L, 12, 13, 20000000000LL, 14, 2.72);
   exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/va-arg-9.c b/gcc/testsuite/gcc.c-torture/execute/va-arg-9.c
index 28d43e6d3cb..2c01683707a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/va-arg-9.c
+++ b/gcc/testsuite/gcc.c-torture/execute/va-arg-9.c
@@ -213,7 +213,8 @@  f15 (int a1, int a2, int a3, int a4, int a5,
   va_end(ap);
 }
 
-main ()
+int
+main (void)
 {
   char *f = "0123456789abcdef";
 
diff --git a/gcc/testsuite/gcc.c-torture/execute/widechar-1.c b/gcc/testsuite/gcc.c-torture/execute/widechar-1.c
index 44a3e5151f9..a54f70deb3f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/widechar-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/widechar-1.c
@@ -9,7 +9,8 @@  void exit(int);
 #define zero C
 #endif
 
-main()
+int
+main(void)
 {
   if (zero != 0)
     abort ();