aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Nerode <neroden@gcc.gnu.org>2003-08-02 02:07:49 +0000
committerNathanael Nerode <neroden@gcc.gnu.org>2003-08-02 02:07:49 +0000
commitef09717a89c4ab90719e9b4c17b3acbfdf10a621 (patch)
treebc0367b0dbd60645d9f0bfb31913e43f8f709551
parent1c787209c2d8aa676c739aec22403981206bdb47 (diff)
downloadgcc-ef09717a89c4ab90719e9b4c17b3acbfdf10a621.zip
gcc-ef09717a89c4ab90719e9b4c17b3acbfdf10a621.tar.gz
gcc-ef09717a89c4ab90719e9b4c17b3acbfdf10a621.tar.bz2
typeck2.c (add_exception_specifier): Use 'bool' where appropriate.
(cp) * typeck2.c (add_exception_specifier): Use 'bool' where appropriate. From-SVN: r70094
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck2.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 9ce5c5e..3ec348a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+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>
PR c++/11697
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index a27df4f..eac8dc1 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -1191,9 +1191,9 @@ build_functional_cast (tree exp, tree parms)
tree
add_exception_specifier (tree list, tree spec, int complain)
{
- int ok;
+ bool ok;
tree core = spec;
- int is_ptr;
+ bool is_ptr;
int diag_type = -1; /* none */
if (spec == error_mark_node)
@@ -1208,16 +1208,16 @@ add_exception_specifier (tree list, tree spec, int complain)
if (is_ptr || TREE_CODE (core) == REFERENCE_TYPE)
core = TREE_TYPE (core);
if (complain < 0)
- ok = 1;
+ ok = true;
else if (VOID_TYPE_P (core))
ok = is_ptr;
else if (TREE_CODE (core) == TEMPLATE_TYPE_PARM)
- ok = 1;
+ ok = true;
else if (processing_template_decl)
- ok = 1;
+ ok = true;
else
{
- ok = 1;
+ ok = true;
/* 15.4/1 says that types in an exception specifier must be complete,
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