diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-13 13:02:24 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-11-13 13:02:24 +0000 |
commit | 1859d8ec16fcbddf72639fcbe2130d6c2b9d6318 (patch) | |
tree | 1e272f79b98bb912af9ba20e66858052ae62f970 /gcc/cp/except.c | |
parent | e118bdb5006a6bb680106bd295fb611ae4a85384 (diff) | |
download | gcc-1859d8ec16fcbddf72639fcbe2130d6c2b9d6318.tar.gz |
* except.c (expand_throw): Make sure first argument to
__cp_push_exception is of type `void*' to avoid spurious error
messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r-- | gcc/cp/except.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 2d069dac6fd..d2cc3e4db6f 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -998,10 +998,7 @@ expand_throw (exp) } if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE) - { - throw_type = build_eh_type (exp); - exp = build_reinterpret_cast (ptr_type_node, exp); - } + throw_type = build_eh_type (exp); else { tree object, ptr; @@ -1075,6 +1072,10 @@ expand_throw (exp) exp = ptr; } + /* Cast EXP to `void *' so that it will match the prototype for + __cp_push_exception. */ + exp = build_reinterpret_cast (ptr_type_node, exp); + if (cleanup == NULL_TREE) { cleanup = build_int_2 (0, 0); |