aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@integrable-solutions.net>2003-09-27 16:44:05 +0000
committerGabriel Dos Reis <gdr@gcc.gnu.org>2003-09-27 16:44:05 +0000
commitc003e212ead438407d7968c2ada135f90307a8be (patch)
treed165f5d3ea36c74d1560aeb2b2e40406468c4db1 /gcc/cp/call.c
parent6398fbfddca9e92f601fa68764b2efccd3a30124 (diff)
downloadgcc-c003e212ead438407d7968c2ada135f90307a8be.zip
gcc-c003e212ead438407d7968c2ada135f90307a8be.tar.gz
gcc-c003e212ead438407d7968c2ada135f90307a8be.tar.bz2
name-lookup.h (get_global_value_if_present): New function.
* name-lookup.h (get_global_value_if_present): New function. (is_typename_at_global_scope): Likewise. * except.c (do_begin_catch): Use get_global_value_if_present. (do_end_catch): Likewise. (do_allocate_exception): Likewise. (do_free_exception): Likewise. (build_throw): Likewise. * parser.c (cp_parser_member_declaration): Likewise. * rtti.c (throw_bad_cast): Likewise. (throw_bad_typeid): Likewise. * decl.c (check_tag_decl): Use is_typename_at_global_scope. (grokdeclarator): Likewise. * cp-tree.h (global_namespace): Move to name-lookup.h * call.c (call_builtin_trap): Tidy. From-SVN: r71858
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 424ec8d..989a84a 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -4192,12 +4192,9 @@ convert_like_real (tree convs, tree expr, tree fn, int argnum, int inner,
static tree
call_builtin_trap (void)
{
- tree fn = get_identifier ("__builtin_trap");
- if (IDENTIFIER_GLOBAL_VALUE (fn))
- fn = IDENTIFIER_GLOBAL_VALUE (fn);
- else
- abort ();
+ tree fn = IDENTIFIER_GLOBAL_VALUE (get_identifier ("__builtin_trap"));
+ my_friendly_assert (fn != NULL, 20030927);
fn = build_call (fn, NULL_TREE);
fn = build (COMPOUND_EXPR, integer_type_node, fn, integer_zero_node);
return fn;