diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-06-28 10:41:19 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-06-28 10:41:19 +0000 |
commit | 0f2a66c9c7ea9602a19ce1fa4a067c1c43e65363 (patch) | |
tree | cf4f78ec248da873e1e177db29f5cbdcd3a378fd /gcc/cp/lex.c | |
parent | 58c42dc28354d5857a5d905d505127eb5624111f (diff) | |
download | gcc-0f2a66c9c7ea9602a19ce1fa4a067c1c43e65363.zip gcc-0f2a66c9c7ea9602a19ce1fa4a067c1c43e65363.tar.gz gcc-0f2a66c9c7ea9602a19ce1fa4a067c1c43e65363.tar.bz2 |
friend.c (add_friend): Only perform access checks when context is a class.
* friend.c (add_friend): Only perform access checks when context
is a class.
* lex.c (cxx_make_type): Only create a binfo for aggregate types.
* parser.c (cp_parser_class_specifier): Disable access checks here
when parsing the body of a templated class.
* semantics.c (perform_or_defer_access_checks): Reorder to allow
NULL binfos when not checking access.
From-SVN: r83771
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r-- | gcc/cp/lex.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index c942269..1daa1fc 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -779,6 +779,8 @@ cxx_make_type (enum tree_code code) presence of parse errors, the normal was of assuring this might not ever get executed, so we lay it out *immediately*. */ build_pointer_type (t); + + TYPE_BINFO (t) = make_binfo (size_zero_node, t, NULL_TREE, NULL_TREE); } else /* We use TYPE_ALIAS_SET for the CLASSTYPE_MARKED bits. But, @@ -786,15 +788,6 @@ cxx_make_type (enum tree_code code) clear it here. */ TYPE_ALIAS_SET (t) = 0; - /* We need to allocate a TYPE_BINFO even for TEMPLATE_TYPE_PARMs - since they can be virtual base types, and we then need a - canonical binfo for them. Ideally, this would be done lazily for - all types. */ - if (IS_AGGR_TYPE_CODE (code) || code == TEMPLATE_TYPE_PARM - || code == BOUND_TEMPLATE_TEMPLATE_PARM - || code == TYPENAME_TYPE) - TYPE_BINFO (t) = make_binfo (size_zero_node, t, NULL_TREE, NULL_TREE); - return t; } |