Commit bd57a622 authored by neroden's avatar neroden
Browse files

(cp)

	* typeck2.c (add_exception_specifier): Use 'bool' where appropriate.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70094 138bc75d-0d04-0410-961f-82ee72b054a4
parent 52789e7b
2003-08-01 Nathanael Nerode <neroden@gcc.gnu.org>
* typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
2003-08-01 Mark Mitchell <mark@codesourcery.com> 2003-08-01 Mark Mitchell <mark@codesourcery.com>
   
PR c++/11697 PR c++/11697
......
...@@ -1191,9 +1191,9 @@ build_functional_cast (tree exp, tree parms) ...@@ -1191,9 +1191,9 @@ build_functional_cast (tree exp, tree parms)
tree tree
add_exception_specifier (tree list, tree spec, int complain) add_exception_specifier (tree list, tree spec, int complain)
{ {
int ok; bool ok;
tree core = spec; tree core = spec;
int is_ptr; bool is_ptr;
int diag_type = -1; /* none */ int diag_type = -1; /* none */
if (spec == error_mark_node) if (spec == error_mark_node)
...@@ -1208,16 +1208,16 @@ add_exception_specifier (tree list, tree spec, int complain) ...@@ -1208,16 +1208,16 @@ add_exception_specifier (tree list, tree spec, int complain)
if (is_ptr || TREE_CODE (core) == REFERENCE_TYPE) if (is_ptr || TREE_CODE (core) == REFERENCE_TYPE)
core = TREE_TYPE (core); core = TREE_TYPE (core);
if (complain < 0) if (complain < 0)
ok = 1; ok = true;
else if (VOID_TYPE_P (core)) else if (VOID_TYPE_P (core))
ok = is_ptr; ok = is_ptr;
else if (TREE_CODE (core) == TEMPLATE_TYPE_PARM) else if (TREE_CODE (core) == TEMPLATE_TYPE_PARM)
ok = 1; ok = true;
else if (processing_template_decl) else if (processing_template_decl)
ok = 1; ok = true;
else else
{ {
ok = 1; ok = true;
/* 15.4/1 says that types in an exception specifier must be complete, /* 15.4/1 says that types in an exception specifier must be complete,
but it seems more reasonable to only require this on definitions but it seems more reasonable to only require this on definitions
and calls. So just give a pedwarn at this point; we will give an and calls. So just give a pedwarn at this point; we will give an
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment