> 2013-10-31 Eric Botcazou <ebotca...@adacore.com>
>
> c-family/
> * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
> (dump_ada_specs): Adjust prototype of second callback.
It turns out that adjusting (constifying) the prototype of the second callback
was a gratuitous change and future enhancements will run afoul of it, so I've
adjusted it back with the attached patch. No functional changes.
Tested on x86_64-suse-linux, applied on the mainline.
2014-01-20 Eric Botcazou <ebotca...@adacore.com>
c-family/
* c-ada-spec.h (dump_ada_specs): Revert prototype change.
* c-ada-spec.c (dump_ads): Likewise.
(cpp_check): Likewise.
(dump_ada_specs): Likewise.
cp/
* decl2.c (cpp_check): Revert prototype change.
--
Eric Botcazou
Index: c-family/c-ada-spec.h
===================================================================
--- c-family/c-ada-spec.h (revision 206790)
+++ c-family/c-ada-spec.h (working copy)
@@ -37,6 +37,6 @@ extern location_t decl_sloc (const_tree,
extern void collect_ada_nodes (tree, const char *);
extern void collect_source_ref (const char *);
extern void dump_ada_specs (void (*)(const char *),
- int (*)(const_tree, cpp_operation));
+ int (*)(tree, cpp_operation));
#endif /* ! C_ADA_SPEC_H */
Index: c-family/c-ada-spec.c
===================================================================
--- c-family/c-ada-spec.c (revision 206790)
+++ c-family/c-ada-spec.c (working copy)
@@ -58,7 +58,7 @@ static void dump_ada_nodes (pretty_print
static void reset_ada_withs (void);
static void dump_ada_withs (FILE *);
static void dump_ads (const char *, void (*)(const char *),
- int (*)(const_tree, cpp_operation));
+ int (*)(tree, cpp_operation));
static char *to_ada_name (const char *, int *);
static bool separate_class_package (tree);
@@ -68,7 +68,7 @@ static bool separate_class_package (tree
#define INDENT_INCR 3
/* Global hook used to perform C++ queries on nodes. */
-static int (*cpp_check) (const_tree, cpp_operation) = NULL;
+static int (*cpp_check) (tree, cpp_operation) = NULL;
/* Given a cpp MACRO, compute the max length BUFFER_LEN of the macro, as well
@@ -975,7 +975,7 @@ is_tagged_type (const_tree type)
sufficiently simple. */
static bool
-has_nontrivial_methods (const_tree type)
+has_nontrivial_methods (tree type)
{
tree tmp;
@@ -3263,7 +3263,7 @@ print_ada_struct_decl (pretty_printer *b
static void
dump_ads (const char *source_file,
void (*collect_all_refs)(const char *),
- int (*check)(const_tree, cpp_operation))
+ int (*check)(tree, cpp_operation))
{
char *ads_name;
char *pkg_name;
@@ -3364,7 +3364,7 @@ collect_source_ref (const char *filename
void
dump_ada_specs (void (*collect_all_refs)(const char *),
- int (*check)(const_tree, cpp_operation))
+ int (*check)(tree, cpp_operation))
{
int i;
Index: cp/decl2.c
===================================================================
--- cp/decl2.c (revision 206790)
+++ cp/decl2.c (working copy)
@@ -3817,7 +3817,7 @@ build_java_method_aliases (struct pointe
/* Return C++ property of T, based on given operation OP. */
static int
-cpp_check (const_tree t, cpp_operation op)
+cpp_check (tree t, cpp_operation op)
{
switch (op)
{