Commit 15f18aac by Richard Henderson Committed by Richard Henderson

crash13.C: Pass -Wreturn-type.

        * g++.old-deja/g++.brendan/crash13.C: Pass -Wreturn-type.
        * g++.old-deja/g++.brendan/crash52.C: Likewise.
        * g++.old-deja/g++.jason/report.C: Likewise.
        * g++.old-deja/g++.law/friend5.C: Likewise.
        * g++.old-deja/g++.mike/p646.C: Likewise.  Adjust the spelling
        of the expected warnings.

From-SVN: r36768
parent c7053b70
2000-10-06 Richard Henderson <rth@cygnus.com>
* g++.old-deja/g++.brendan/crash13.C: Pass -Wreturn-type.
* g++.old-deja/g++.brendan/crash52.C: Likewise.
* g++.old-deja/g++.jason/report.C: Likewise.
* g++.old-deja/g++.law/friend5.C: Likewise.
* g++.old-deja/g++.mike/p646.C: Likewise. Adjust the spelling
of the expected warnings.
2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/enum14.C: New test.
......
// Build don't link:
// GROUPS passed old-abort
// Special g++ Options: -Wreturn-type
class gen_op
{
public:
......
// Build don't link:
// GROUPS passed old-abort
// Special g++ Options: -Wreturn-type
#include <iostream.h>
class A {
......
// Build don't link:
// GROUPS passed error-reporting
// Special g++ Options: -Wreturn-type
template <char C>
class badoo
{
......
// Build don't link:
// GROUPS passed friends
// Special g++ Options: -Wreturn-type
extern "C" int good_friend(int);
extern "C" int bad_friend();
......
......@@ -6,7 +6,7 @@
*/
// Special g++ Options: -Wno-deprecated
// Special g++ Options: -Wno-deprecated -Wreturn-type
extern "C"
{
......@@ -107,7 +107,7 @@ warn_return_1 ()
{
foo f;
printf ("returning 1\n");
} // WARNING - no return statement
} // WARNING - control reaches end
int
warn_return_arg (int arg)
......@@ -115,7 +115,7 @@ warn_return_arg (int arg)
foo f;
printf ("returning %d\n", arg);
arg;
} // WARNING - no return statement
} // WARNING - control reaches end
int
warn_return_sum (int x, int y)
......@@ -123,14 +123,14 @@ warn_return_sum (int x, int y)
foo f;
printf ("returning %d+%d\n", x, y);
x + y;
} // WARNING - no return statement
} // WARNING - control reaches end
foo
warn_return_foo ()
{
foo f;
printf ("returning foo\n");
} // WARNING - no return statement
} // WARNING - control reaches end
foo
nowarn_return_named_foo () return f
......@@ -142,10 +142,10 @@ foo
warn_foo_parm_returns_foo (foo f)
{
f;
} // WARNING - no return statement
} // WARNING - control reaches end
main ()
{
{ // WARNING - no type
int ii = return_1 ();
if (ii != 1)
abort_because ("wrong value returned");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment