From 2c701c0144597c41dbf9bb18cf202166ab2c756d Mon Sep 17 00:00:00 2001 From: Tim Josling <tej@melbpc.org.au> Date: Tue, 9 Jul 2002 21:19:08 +0000 Subject: [PATCH] Treelang updates for new attrib regime. From-SVN: r55344 --- gcc/treelang/ChangeLog | 10 ++++++++++ gcc/treelang/treetree.c | 10 ++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 9cf6c78867fe..59e06b5a34ee 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,13 @@ +2002-07-09 Tim Josling <tej@melbpc.org.au> + + Support new attributes regime (Fix for PR c++/7099). + + * treetree.c (handle_format_attribute): Return NULL_TREE instead + of aborting. + (top level): Define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE + LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE + LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES as the standard C routines. + 2002-06-21 Andreas Jaeger <aj@suse.de> * Make-lang.in (treelang/tree1.o, treelang/treetree.o, diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index 2d05ce1bbf48..5c8295600485 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -119,6 +119,12 @@ int warn_format_zero_length = 0; #define LANG_HOOKS_TYPE_FOR_SIZE c_common_type_for_size #undef LANG_HOOKS_PARSE_FILE #define LANG_HOOKS_PARSE_FILE treelang_parse_file +#undef LANG_HOOKS_COMMON_ATTRIBUTE_TABLE +#define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE c_common_attribute_table +#undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE +#define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE c_common_format_attribute_table +#undef LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES +#define LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES c_insert_default_attributes /* Hook routines and data unique to treelang. */ @@ -996,7 +1002,7 @@ cpp_errors (cpp_reader *pfile ATTRIBUTE_UNUSED) abort (); } -/* Should not be called for treelang. */ +/* Dummy called by C. */ tree handle_format_attribute (tree *node ATTRIBUTE_UNUSED, @@ -1005,7 +1011,7 @@ handle_format_attribute (tree *node ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED, bool *no_add_attrs ATTRIBUTE_UNUSED) { - abort (); + return NULL_TREE; } /* Should not be called for treelang. */ -- GitLab