From e8423af96d93b8577306598b1fba01cabc4f7622 Mon Sep 17 00:00:00 2001 From: Waldek Hebisch Date: Mon, 15 Dec 2003 15:45:51 +0100 Subject: [PATCH] tree.c (initializer_zerop): Add test for empty set. 2003-12-15 Waldek Hebisch * tree.c (initializer_zerop): Add test for empty set. * integrate.c (function_cannot_inline_p): Forbid inlining functions calling `longjmp'. From-SVN: r74633 --- gcc/ChangeLog | 8 +++++++- gcc/integrate.c | 3 +++ gcc/tree.c | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bde0cc07af8..5778a9328a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-12-15 Waldek Hebisch + + * tree.c (initializer_zerop): Add test for empty set. + * integrate.c (function_cannot_inline_p): Forbid inlining + functions calling `longjmp'. + 2003-12-15 Nathan Sidwell PR c++/11773 @@ -62,7 +68,7 @@ (ggc_collect_1): Always mark and sweep if a zone has the `dead' flag set. (ggc_collect): Free dead zones after collecting. - + 2003-12-13 Jan Hubicka * coverage.c (get_coverage_counts): Use inform instead of warning diff --git a/gcc/integrate.c b/gcc/integrate.c index fa5d71efa00..f317627e487 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -172,6 +172,9 @@ function_cannot_inline_p (tree fndecl) if (current_function_calls_alloca) return N_("function using alloca cannot be inline"); + if (current_function_calls_longjmp) + return N_("function using longjmp cannot be inline"); + if (current_function_calls_setjmp) return N_("function using setjmp cannot be inline"); diff --git a/gcc/tree.c b/gcc/tree.c index 8466990ad5d..52faeaf16e6 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5011,6 +5011,11 @@ initializer_zerop (tree init) && ! REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (TREE_IMAGPART (init)))); case CONSTRUCTOR: { + /* Set is empty if it has no elements. */ + if ((TREE_CODE (TREE_TYPE (init)) == SET_TYPE) + && CONSTRUCTOR_ELTS (init)) + return false; + if (AGGREGATE_TYPE_P (TREE_TYPE (init))) { tree aggr_init = CONSTRUCTOR_ELTS (init); -- 2.30.2