optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
* optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT. * g++.old-deja/g++.other/cleanup4.C: New test. From-SVN: r38110
This commit is contained in:
parent
c0d82ab19c
commit
5eec284733
|
@ -1,3 +1,7 @@
|
||||||
|
2000-12-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
|
||||||
|
|
||||||
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
|
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||||
|
|
||||||
* decl2.c (lang_decode_option): Handle -Wformat-security.
|
* decl2.c (lang_decode_option): Handle -Wformat-security.
|
||||||
|
|
|
@ -289,6 +289,7 @@ copy_body_r (tp, walk_subtrees, data)
|
||||||
{
|
{
|
||||||
*tp = build_stmt (EXPR_STMT,
|
*tp = build_stmt (EXPR_STMT,
|
||||||
RETURN_EXPR (return_stmt));
|
RETURN_EXPR (return_stmt));
|
||||||
|
STMT_IS_FULL_EXPR_P (*tp) = 1;
|
||||||
/* And then jump to the end of the function. */
|
/* And then jump to the end of the function. */
|
||||||
TREE_CHAIN (*tp) = goto_stmt;
|
TREE_CHAIN (*tp) = goto_stmt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2000-12-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* g++.old-deja/g++.other/cleanup4.C: New test.
|
||||||
|
|
||||||
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
|
2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||||
|
|
||||||
* format-sec-1.c: New test.
|
* format-sec-1.c: New test.
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
// Build don't link:
|
||||||
|
// Origin: Jakub Jelinek <jakub@redhat.com>
|
||||||
|
// Special g++ Options: -O2 -fno-exceptions
|
||||||
|
|
||||||
|
class foo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
foo ();
|
||||||
|
~foo ();
|
||||||
|
};
|
||||||
|
|
||||||
|
class bar
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
bar ();
|
||||||
|
bar (const foo&);
|
||||||
|
};
|
||||||
|
|
||||||
|
int i;
|
||||||
|
foo f ();
|
||||||
|
|
||||||
|
inline bar x ()
|
||||||
|
{
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 0: return bar (f ());
|
||||||
|
default: return bar ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bar y ()
|
||||||
|
{
|
||||||
|
return x ();
|
||||||
|
}
|
Loading…
Reference in New Issue