diff options
author | Jason Merrill <jason@redhat.com> | 2002-02-13 12:36:20 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-02-13 12:36:20 -0500 |
commit | 57d5032b06dc706d2c1801f27ac2788a970e5707 (patch) | |
tree | 4d1c148f0b51a94ca0a5d9552148ffe2ed39ac2c /gcc | |
parent | c66b9fd97ed56f5cedd9aaa0f52c8f49034a1eb5 (diff) | |
download | gcc-57d5032b06dc706d2c1801f27ac2788a970e5707.zip gcc-57d5032b06dc706d2c1801f27ac2788a970e5707.tar.gz gcc-57d5032b06dc706d2c1801f27ac2788a970e5707.tar.bz2 |
decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
* decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
(finish_function): Don't warn if current_function_returns_null.
From-SVN: r49738
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 82f6458..ac273b1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2002-02-13 Jason Merrill <jason@redhat.com> + * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns. + (finish_function): Don't warn if current_function_returns_null. + * typeck2.c (digest_init): Do handle values of vector type. * typeck2.c (digest_init, process_init_constructor): Treat vectors diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 158dc8f..ecc6083 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6719,6 +6719,10 @@ builtin_function (name, type, code, class, libname) DECL_BUILT_IN_CLASS (decl) = class; DECL_FUNCTION_CODE (decl) = code; + /* The return builtins leave the current function. */ + if (code == BUILT_IN_RETURN || code == BUILT_IN_EH_RETURN) + TREE_THIS_VOLATILE (decl) = 1; + my_friendly_assert (DECL_CONTEXT (decl) == NULL_TREE, 392); /* All builtins that don't begin with an `_' should go in the `std' @@ -14224,7 +14228,7 @@ finish_function (flags) /* Complain if there's just no return statement. */ if (!processing_template_decl && TREE_CODE (TREE_TYPE (fntype)) != VOID_TYPE - && !current_function_returns_value + && !current_function_returns_value && !current_function_returns_null && !DECL_NAME (DECL_RESULT (fndecl)) /* Don't complain if we abort or throw. */ && !current_function_returns_abnormally |