aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2017-04-26 22:47:20 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2017-04-26 22:47:20 +0000
commitc8040757ddcfc6458edd464103c8c63db676c2cb (patch)
treee37dbde3a8840e133f2318df61df80981fa94240
parent9425300b415916c5474204fa1157c94612d9f8ac (diff)
downloadgcc-c8040757ddcfc6458edd464103c8c63db676c2cb.zip
gcc-c8040757ddcfc6458edd464103c8c63db676c2cb.tar.gz
gcc-c8040757ddcfc6458edd464103c8c63db676c2cb.tar.bz2
decl.c (grok_ctor_properties, [...]): Change return type to bool.
2017-04-26 Paolo Carlini <paolo.carlini@oracle.com> * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change return type to bool. * cp-tree.h (grok_ctor_properties): Update. From-SVN: r247286
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cp-tree.h2
-rw-r--r--gcc/cp/decl.c14
3 files changed, 14 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 40d2cc2..4d7a048 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * decl.c (grok_ctor_properties, ambi_op_p, unary_op_p): Change
+ return type to bool.
+ * cp-tree.h (grok_ctor_properties): Update.
+
2017-04-26 Volker Reichelt <v.reichelt@netcologne.de>
* parser.c (cp_parser_nested_name_specifier_opt): Add fix-it
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1d53e69..3bbc0bf 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -5860,7 +5860,7 @@ extern bool move_fn_p (const_tree);
extern bool move_signature_fn_p (const_tree);
extern tree get_scope_of_declarator (const cp_declarator *);
extern void grok_special_member_properties (tree);
-extern int grok_ctor_properties (const_tree, const_tree);
+extern bool grok_ctor_properties (const_tree, const_tree);
extern bool grok_op_properties (tree, bool);
extern tree xref_tag (enum tag_types, tree, tag_scope, bool);
extern tree xref_tag_from_type (tree, tree, tag_scope);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 8c8cf84..4f06572 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -64,8 +64,8 @@ static const char *redeclaration_error_message (tree, tree);
static int decl_jump_unsafe (tree);
static void require_complete_types_for_parms (tree);
-static int ambi_op_p (enum tree_code);
-static int unary_op_p (enum tree_code);
+static bool ambi_op_p (enum tree_code);
+static bool unary_op_p (enum tree_code);
static void push_local_name (tree);
static tree grok_reference_init (tree, tree, tree, int);
static tree grokvardecl (tree, tree, tree, const cp_decl_specifier_seq *,
@@ -12907,7 +12907,7 @@ grok_special_member_properties (tree decl)
/* Check a constructor DECL has the correct form. Complains
if the class has a constructor of the form X(X). */
-int
+bool
grok_ctor_properties (const_tree ctype, const_tree decl)
{
int ctor_parm = copy_fn_p (decl);
@@ -12931,15 +12931,15 @@ grok_ctor_properties (const_tree ctype, const_tree decl)
instantiated, but that's hard to forestall. */
error ("invalid constructor; you probably meant %<%T (const %T&)%>",
ctype, ctype);
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* An operator with this code is unary, but can also be binary. */
-static int
+static bool
ambi_op_p (enum tree_code code)
{
return (code == INDIRECT_REF
@@ -12952,7 +12952,7 @@ ambi_op_p (enum tree_code code)
/* An operator with this name can only be unary. */
-static int
+static bool
unary_op_p (enum tree_code code)
{
return (code == TRUTH_NOT_EXPR