diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-10-23 02:26:32 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-10-22 22:26:32 -0400 |
commit | 0aaa90896608511a17211385ede533ef5b46327e (patch) | |
tree | c6e279b75c6748b8d90e4110fed1fe27a545da3d /gcc/cp/cp-tree.h | |
parent | ccb5954fea236ccb5e521b1d644962959daced28 (diff) | |
download | gcc-0aaa90896608511a17211385ede533ef5b46327e.zip gcc-0aaa90896608511a17211385ede533ef5b46327e.tar.gz gcc-0aaa90896608511a17211385ede533ef5b46327e.tar.bz2 |
cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
* cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
(CP_TYPE_VOLATILE): Likewise.
* decl.c (grokdeclarator): Use them.
* tree.c (canonical_type_variant): Likewise.
From-SVN: r23244
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r-- | gcc/cp/cp-tree.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 51c531b..ad874a1 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -514,6 +514,15 @@ enum languages { lang_c, lang_cplusplus, lang_java }; /* The _DECL for this _TYPE. */ #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE))) +#define CP_TYPE_READONLY(NODE) \ + (TREE_CODE (NODE) == ARRAY_TYPE \ + ? TYPE_READONLY (TREE_TYPE (NODE)) \ + : TYPE_READONLY (NODE)) +#define CP_TYPE_VOLATILE(NODE) \ + (TREE_CODE (NODE) == ARRAY_TYPE \ + ? TYPE_VOLATILE (TREE_TYPE (NODE)) \ + : TYPE_VOLATILE (NODE)) + /* Nonzero if T is a class (or struct or union) type. Also nonzero for template type parameters and typename types. Despite its name, this macro has nothing to do with the definition of aggregate given |