aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2001-06-29 18:21:16 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2001-06-29 18:21:16 +0100
commit8d8e52be8aeb3b679baac38d41cbc07448a44ac7 (patch)
treebd38f64051daf12fcb923a601e97e3cdc91a4c67 /gcc/cp
parent8440bf436737856525743cd6ce979e5d0ce487be (diff)
downloadgcc-8d8e52be8aeb3b679baac38d41cbc07448a44ac7.zip
gcc-8d8e52be8aeb3b679baac38d41cbc07448a44ac7.tar.gz
gcc-8d8e52be8aeb3b679baac38d41cbc07448a44ac7.tar.bz2
target.h (struct gcc_target): Add comp_type_attributes and set_default_type_attributes.
* target.h (struct gcc_target): Add comp_type_attributes and set_default_type_attributes. * target-def.h (TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define. (TARGET_INITIALIZER): Update. * doc/tm.texi (COMP_TYPE_ATTRIBUTES, TARGET_COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Update documentation of old target macros to describe new target hooks. * tree.c (make_node): Use target.set_default_type_attributes. (default_comp_type_attributes, default_set_default_type_attributes): New functions. * tree.h (default_comp_type_attributes, default_set_default_type_attributes): Declare. * c-typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. (comptypes): Use target.comp_type_attributes. * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h (arc_comp_type_attributes, arc_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove functions and macros with default behaviour. * config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h (m32r_comp_type_attributes, m32r_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h (m68hc11_comp_type_attributes, m68hc11_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h (ns32k_comp_type_attributes, COMP_TYPE_ATTRIBUTES): Likewise. * config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h (rs6000_comp_type_attributes, rs6000_set_default_type_attributes, COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/d30v/d30v.h (COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Remove commented out macro definitions. * config/i386/i386.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/ns32k/ns32k.h (SET_DEFAULT_TYPE_ATTRIBUTES): Likewise. * config/arm/arm.c (arm_comp_type_attributes, arm_set_default_type_attributes): Make static. (TARGET_COMP_TYPE_ATTRIBUTES, TARGET_SET_DEFAULT_TYPE_ATTRIBUTES): Define. * config/arm/arm.h (COMP_TYPE_ATTRIBUTES, SET_DEFAULT_TYPE_ATTRIBUTES): Don't define. * config/arm/arm-protos.h (arm_comp_type_attributes, arm_set_default_type_attributes): Don't declare. * config/i386/i386.c (ix86_comp_type_attributes): Make static. (TARGET_COMP_TYPE_ATTRIBUTES): Define. * config/i386/i386.h (COMP_TYPE_ATTRIBUTES): Don't define. * config/i386/i386-protos.h (ix86_comp_type_attributes): Don't declare. cp: * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define. (comptypes): Use target.comp_type_attributes. From-SVN: r43655
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/typeck.c8
2 files changed, 6 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 62e1f4a..2b55f03 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
+ (comptypes): Use target.comp_type_attributes.
+
2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
* cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index db1044a..cb1146e 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -996,16 +996,10 @@ comptypes (t1, t2, strict)
if (TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2))
return 1;
- /* ??? COMP_TYPE_ATTRIBUTES is currently useless for variables as each
- attribute is its own main variant (`val' will remain 0). */
-#ifndef COMP_TYPE_ATTRIBUTES
-#define COMP_TYPE_ATTRIBUTES(t1,t2) 1
-#endif
-
if (strict & COMPARE_NO_ATTRIBUTES)
attrval = 1;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */
- else if (! (attrval = COMP_TYPE_ATTRIBUTES (t1, t2)))
+ else if (! (attrval = (*target.comp_type_attributes) (t1, t2)))
return 0;
/* 1 if no need for warning yet, 2 if warning cause has been seen. */