Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
beb53fb8
Commit
beb53fb8
authored
May 06, 1997
by
Jason Merrill
Committed by
Mike Stump
May 06, 1997
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
91th Cygnus<->FSF quick merge
From-SVN: r14021
parent
065bbfe6
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
181 additions
and
172 deletions
+181
-172
gcc/cp/ChangeLog
+4
-0
gcc/cp/call.c
+14
-12
gcc/cp/class.c
+25
-24
gcc/cp/cvt.c
+2
-2
gcc/cp/decl.c
+62
-60
gcc/cp/except.c
+26
-26
gcc/cp/expr.c
+2
-2
gcc/cp/friend.c
+4
-4
gcc/cp/init.c
+2
-2
gcc/cp/method.c
+2
-2
gcc/cp/pt.c
+7
-7
gcc/cp/rtti.c
+6
-6
gcc/cp/search.c
+10
-10
gcc/cp/sig.c
+11
-11
gcc/cp/typeck.c
+4
-4
No files found.
gcc/cp/ChangeLog
View file @
beb53fb8
Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (build_new_op): Handle null arg2 for ?:.
Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
* except.c (expand_exception_blocks): Ensure that we flow through
* except.c (expand_exception_blocks): Ensure that we flow through
...
...
gcc/cp/call.c
View file @
beb53fb8
/* Functions related to invoking methods and overloaded functions.
/* Functions related to invoking methods and overloaded functions.
Copyright (C) 1987,
1992, 1993, 1994, 1995
Free Software Foundation, Inc.
Copyright (C) 1987,
92, 93, 94, 95, 96, 1997
Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and
Contributed by Michael Tiemann (tiemann@cygnus.com) and
hacked by Brendan Kehoe (brendan@cygnus.com).
hacked by Brendan Kehoe (brendan@cygnus.com).
...
@@ -1896,10 +1896,10 @@ build_method_call (instance, name, parms, basetype_path, flags)
...
@@ -1896,10 +1896,10 @@ build_method_call (instance, name, parms, basetype_path, flags)
/* The MAIN_VARIANT of the type that `instance_ptr' winds up being. */
/* The MAIN_VARIANT of the type that `instance_ptr' winds up being. */
tree
inst_ptr_basetype
;
tree
inst_ptr_basetype
;
static_call_context
=
static_call_context
(
TREE_CODE
(
instance
)
==
INDIRECT_REF
=
(
TREE_CODE
(
instance
)
==
INDIRECT_REF
&&
TREE_CODE
(
TREE_OPERAND
(
instance
,
0
))
==
NOP_EXPR
&&
TREE_CODE
(
TREE_OPERAND
(
instance
,
0
))
==
NOP_EXPR
&&
TREE_OPERAND
(
TREE_OPERAND
(
instance
,
0
),
0
)
==
error_mark_node
);
&&
TREE_OPERAND
(
TREE_OPERAND
(
instance
,
0
),
0
)
==
error_mark_node
);
if
(
TREE_CODE
(
instance
)
==
OFFSET_REF
)
if
(
TREE_CODE
(
instance
)
==
OFFSET_REF
)
instance
=
resolve_offset_ref
(
instance
);
instance
=
resolve_offset_ref
(
instance
);
...
@@ -1997,8 +1997,9 @@ build_method_call (instance, name, parms, basetype_path, flags)
...
@@ -1997,8 +1997,9 @@ build_method_call (instance, name, parms, basetype_path, flags)
if
(
basetype_path
==
NULL_TREE
if
(
basetype_path
==
NULL_TREE
&&
IS_SIGNATURE
(
basetype
))
&&
IS_SIGNATURE
(
basetype
))
basetype_path
=
TYPE_BINFO
(
basetype
);
basetype_path
=
TYPE_BINFO
(
basetype
);
else
if
(
basetype_path
==
NULL_TREE
||
else
if
(
basetype_path
==
NULL_TREE
BINFO_TYPE
(
basetype_path
)
!=
TYPE_MAIN_VARIANT
(
inst_ptr_basetype
))
||
(
BINFO_TYPE
(
basetype_path
)
!=
TYPE_MAIN_VARIANT
(
inst_ptr_basetype
)))
basetype_path
=
TYPE_BINFO
(
inst_ptr_basetype
);
basetype_path
=
TYPE_BINFO
(
inst_ptr_basetype
);
result
=
build_field_call
(
basetype_path
,
instance_ptr
,
name
,
parms
);
result
=
build_field_call
(
basetype_path
,
instance_ptr
,
name
,
parms
);
...
@@ -4607,7 +4608,8 @@ build_new_op (code, flags, arg1, arg2, arg3)
...
@@ -4607,7 +4608,8 @@ build_new_op (code, flags, arg1, arg2, arg3)
if
(
code
==
COND_EXPR
)
if
(
code
==
COND_EXPR
)
{
{
if
(
TREE_CODE
(
TREE_TYPE
(
arg2
))
==
VOID_TYPE
if
(
arg2
==
NULL_TREE
||
TREE_CODE
(
TREE_TYPE
(
arg2
))
==
VOID_TYPE
||
TREE_CODE
(
TREE_TYPE
(
arg3
))
==
VOID_TYPE
||
TREE_CODE
(
TREE_TYPE
(
arg3
))
==
VOID_TYPE
||
(
!
IS_OVERLOAD_TYPE
(
TREE_TYPE
(
arg2
))
||
(
!
IS_OVERLOAD_TYPE
(
TREE_TYPE
(
arg2
))
&&
!
IS_OVERLOAD_TYPE
(
TREE_TYPE
(
arg3
))))
&&
!
IS_OVERLOAD_TYPE
(
TREE_TYPE
(
arg3
))))
...
@@ -5046,8 +5048,8 @@ build_over_call (fn, convs, args, flags)
...
@@ -5046,8 +5048,8 @@ build_over_call (fn, convs, args, flags)
<
TYPE_VOLATILE
(
TREE_TYPE
(
argtype
)));
<
TYPE_VOLATILE
(
TREE_TYPE
(
argtype
)));
int
dc
=
(
TYPE_READONLY
(
TREE_TYPE
(
parmtype
))
int
dc
=
(
TYPE_READONLY
(
TREE_TYPE
(
parmtype
))
<
TYPE_READONLY
(
TREE_TYPE
(
argtype
)));
<
TYPE_READONLY
(
TREE_TYPE
(
argtype
)));
char
*
p
=
(
dv
&&
dc
?
"const and volatile"
:
char
*
p
=
(
dv
&&
dc
?
"const and volatile"
dc
?
"const"
:
dv
?
"volatile"
:
""
);
:
dc
?
"const"
:
dv
?
"volatile"
:
""
);
cp_pedwarn
(
"passing `%T' as `this' argument of `%#D' discards %s"
,
cp_pedwarn
(
"passing `%T' as `this' argument of `%#D' discards %s"
,
TREE_TYPE
(
argtype
),
fn
,
p
);
TREE_TYPE
(
argtype
),
fn
,
p
);
...
@@ -5310,8 +5312,8 @@ build_new_method_call (instance, name, args, basetype_path, flags)
...
@@ -5310,8 +5312,8 @@ build_new_method_call (instance, name, args, basetype_path, flags)
TREE_TYPE
(
instance_ptr
)
=
build_pointer_type
(
basetype
);
TREE_TYPE
(
instance_ptr
)
=
build_pointer_type
(
basetype
);
}
}
pretty_name
=
pretty_name
(
name
==
ctor_identifier
?
constructor_name_full
(
basetype
)
:
name
);
=
(
name
==
ctor_identifier
?
constructor_name_full
(
basetype
)
:
name
);
fns
=
lookup_fnfields
(
basetype_path
,
name
,
1
);
fns
=
lookup_fnfields
(
basetype_path
,
name
,
1
);
...
...
gcc/cp/class.c
View file @
beb53fb8
...
@@ -2144,8 +2144,8 @@ finish_vtbls (binfo, do_self, t)
...
@@ -2144,8 +2144,8 @@ finish_vtbls (binfo, do_self, t)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
TREE_VIA_VIRTUAL
(
base_binfo
))
{
{
base_binfo
=
binfo_member
(
BINFO_TYPE
(
base_binfo
),
CLASSTYPE_VBASECLASSES
(
t
));
base_binfo
=
binfo_member
(
BINFO_TYPE
(
base_binfo
),
CLASSTYPE_VBASECLASSES
(
t
));
...
@@ -2162,11 +2162,11 @@ overrides (fndecl, base_fndecl)
...
@@ -2162,11 +2162,11 @@ overrides (fndecl, base_fndecl)
tree
fndecl
,
base_fndecl
;
tree
fndecl
,
base_fndecl
;
{
{
/* Destructors have special names. */
/* Destructors have special names. */
if
(
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
base_fndecl
))
&&
if
(
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
base_fndecl
))
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
fndecl
)))
&&
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
fndecl
)))
return
1
;
return
1
;
if
(
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
base_fndecl
))
||
if
(
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
base_fndecl
))
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
fndecl
)))
||
DESTRUCTOR_NAME_P
(
DECL_ASSEMBLER_NAME
(
fndecl
)))
return
0
;
return
0
;
if
(
DECL_NAME
(
fndecl
)
==
DECL_NAME
(
base_fndecl
))
if
(
DECL_NAME
(
fndecl
)
==
DECL_NAME
(
base_fndecl
))
{
{
...
@@ -2397,8 +2397,8 @@ modify_all_direct_vtables (binfo, do_self, t, fndecl, pfn)
...
@@ -2397,8 +2397,8 @@ modify_all_direct_vtables (binfo, do_self, t, fndecl, pfn)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
modify_all_direct_vtables
(
base_binfo
,
is_not_base_vtable
,
t
,
fndecl
,
pfn
);
modify_all_direct_vtables
(
base_binfo
,
is_not_base_vtable
,
t
,
fndecl
,
pfn
);
}
}
...
@@ -2493,8 +2493,8 @@ fixup_vtable_deltas (binfo, init_self, t)
...
@@ -2493,8 +2493,8 @@ fixup_vtable_deltas (binfo, init_self, t)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
fixup_vtable_deltas
(
base_binfo
,
is_not_base_vtable
,
t
);
fixup_vtable_deltas
(
base_binfo
,
is_not_base_vtable
,
t
);
}
}
...
@@ -2525,8 +2525,8 @@ modify_all_indirect_vtables (binfo, do_self, via_virtual, t, fndecl, pfn)
...
@@ -2525,8 +2525,8 @@ modify_all_indirect_vtables (binfo, do_self, via_virtual, t, fndecl, pfn)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
TREE_VIA_VIRTUAL
(
base_binfo
))
{
{
via_virtual
=
1
;
via_virtual
=
1
;
...
@@ -2705,8 +2705,8 @@ merge_overrides (binfo, old, do_self, t)
...
@@ -2705,8 +2705,8 @@ merge_overrides (binfo, old, do_self, t)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
old_base_binfo
=
TREE_VEC_ELT
(
old_binfos
,
i
);
tree
old_base_binfo
=
TREE_VEC_ELT
(
old_binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
merge_overrides
(
base_binfo
,
old_base_binfo
,
is_not_base_vtable
,
t
);
merge_overrides
(
base_binfo
,
old_base_binfo
,
is_not_base_vtable
,
t
);
}
}
...
@@ -3221,8 +3221,9 @@ finish_struct_1 (t, warn_anon)
...
@@ -3221,8 +3221,9 @@ finish_struct_1 (t, warn_anon)
tree
ctype
=
DECL_INITIAL
(
x
);
tree
ctype
=
DECL_INITIAL
(
x
);
tree
sname
=
DECL_NAME
(
x
);
tree
sname
=
DECL_NAME
(
x
);
tree
access
tree
access
=
TREE_PRIVATE
(
x
)
?
access_private_node
:
=
TREE_PRIVATE
(
x
)
?
access_private_node
TREE_PROTECTED
(
x
)
?
access_protected_node
:
access_public_node
;
:
TREE_PROTECTED
(
x
)
?
access_protected_node
:
access_public_node
;
tree
fdecl
,
binfo
;
tree
fdecl
,
binfo
;
if
(
last_x
)
if
(
last_x
)
...
@@ -4606,9 +4607,9 @@ pushclass (type, modify)
...
@@ -4606,9 +4607,9 @@ pushclass (type, modify)
*
current_class_stack
++
=
current_class_type
;
*
current_class_stack
++
=
current_class_type
;
if
(
current_class_stack
>=
current_class_base
+
current_class_stacksize
)
if
(
current_class_stack
>=
current_class_base
+
current_class_stacksize
)
{
{
current_class_base
=
current_class_base
(
tree
*
)
xrealloc
(
current_class_base
,
=
(
tree
*
)
xrealloc
(
current_class_base
,
sizeof
(
tree
)
*
(
current_class_stacksize
+
10
));
sizeof
(
tree
)
*
(
current_class_stacksize
+
10
));
current_class_stack
=
current_class_base
+
current_class_stacksize
;
current_class_stack
=
current_class_base
+
current_class_stacksize
;
current_class_stacksize
+=
10
;
current_class_stacksize
+=
10
;
}
}
...
@@ -4790,9 +4791,9 @@ push_lang_context (name)
...
@@ -4790,9 +4791,9 @@ push_lang_context (name)
*
current_lang_stack
++
=
current_lang_name
;
*
current_lang_stack
++
=
current_lang_name
;
if
(
current_lang_stack
>=
current_lang_base
+
current_lang_stacksize
)
if
(
current_lang_stack
>=
current_lang_base
+
current_lang_stacksize
)
{
{
current_lang_base
=
current_lang_base
(
tree
*
)
xrealloc
(
current_lang_base
,
=
(
tree
*
)
xrealloc
(
current_lang_base
,
sizeof
(
tree
)
*
(
current_lang_stacksize
+
10
));
sizeof
(
tree
)
*
(
current_lang_stacksize
+
10
));
current_lang_stack
=
current_lang_base
+
current_lang_stacksize
;
current_lang_stack
=
current_lang_base
+
current_lang_stacksize
;
current_lang_stacksize
+=
10
;
current_lang_stacksize
+=
10
;
}
}
...
@@ -5257,8 +5258,8 @@ instantiate_type (lhstype, rhs, complain)
...
@@ -5257,8 +5258,8 @@ instantiate_type (lhstype, rhs, complain)
TREE_TYPE
(
rhs
)
=
lhstype
;
TREE_TYPE
(
rhs
)
=
lhstype
;
TREE_OPERAND
(
rhs
,
0
)
=
fn
;
TREE_OPERAND
(
rhs
,
0
)
=
fn
;
TREE_CONSTANT
(
rhs
)
=
staticp
(
fn
);
TREE_CONSTANT
(
rhs
)
=
staticp
(
fn
);
if
(
TREE_CODE
(
lhstype
)
==
POINTER_TYPE
&&
if
(
TREE_CODE
(
lhstype
)
==
POINTER_TYPE
TREE_CODE
(
TREE_TYPE
(
lhstype
))
==
METHOD_TYPE
)
&&
TREE_CODE
(
TREE_TYPE
(
lhstype
))
==
METHOD_TYPE
)
{
{
build_ptrmemfunc_type
(
lhstype
);
build_ptrmemfunc_type
(
lhstype
);
rhs
=
build_ptrmemfunc
(
lhstype
,
rhs
,
0
);
rhs
=
build_ptrmemfunc
(
lhstype
,
rhs
,
0
);
...
...
gcc/cp/cvt.c
View file @
beb53fb8
...
@@ -707,8 +707,8 @@ convert_to_aggr (type, expr, msgp, protect)
...
@@ -707,8 +707,8 @@ convert_to_aggr (type, expr, msgp, protect)
{
{
int
saw_private
=
0
;
int
saw_private
=
0
;
int
saw_protected
=
0
;
int
saw_protected
=
0
;
struct
candidate
*
candidates
=
struct
candidate
*
candidates
(
struct
candidate
*
)
alloca
((
decl_list_length
(
fndecl
)
+
1
)
*
sizeof
(
struct
candidate
));
=
(
struct
candidate
*
)
alloca
((
decl_list_length
(
fndecl
)
+
1
)
*
sizeof
(
struct
candidate
));
struct
candidate
*
cp
=
candidates
;
struct
candidate
*
cp
=
candidates
;
while
(
fndecl
)
while
(
fndecl
)
...
...
gcc/cp/decl.c
View file @
beb53fb8
...
@@ -1820,8 +1820,8 @@ maybe_push_to_top_level (pseudo)
...
@@ -1820,8 +1820,8 @@ maybe_push_to_top_level (pseudo)
int
pseudo
;
int
pseudo
;
{
{
extern
int
current_lang_stacksize
;
extern
int
current_lang_stacksize
;
struct
saved_scope
*
s
=
struct
saved_scope
*
s
(
struct
saved_scope
*
)
xmalloc
(
sizeof
(
struct
saved_scope
));
=
(
struct
saved_scope
*
)
xmalloc
(
sizeof
(
struct
saved_scope
));
struct
binding_level
*
b
=
inner_binding_level
;
struct
binding_level
*
b
=
inner_binding_level
;
tree
old_bindings
=
NULL_TREE
;
tree
old_bindings
=
NULL_TREE
;
...
@@ -4707,10 +4707,10 @@ init_decl_processing ()
...
@@ -4707,10 +4707,10 @@ init_decl_processing ()
/* Define `char', which is like either `signed char' or `unsigned char'
/* Define `char', which is like either `signed char' or `unsigned char'
but not the same as either. */
but not the same as either. */
char_type_node
=
char_type_node
(
flag_signed_char
=
(
flag_signed_char
?
make_signed_type
(
CHAR_TYPE_SIZE
)
?
make_signed_type
(
CHAR_TYPE_SIZE
)
:
make_unsigned_type
(
CHAR_TYPE_SIZE
));
:
make_unsigned_type
(
CHAR_TYPE_SIZE
));
record_builtin_type
(
RID_CHAR
,
"char"
,
char_type_node
);
record_builtin_type
(
RID_CHAR
,
"char"
,
char_type_node
);
long_integer_type_node
=
make_signed_type
(
LONG_TYPE_SIZE
);
long_integer_type_node
=
make_signed_type
(
LONG_TYPE_SIZE
);
...
@@ -4843,8 +4843,8 @@ init_decl_processing ()
...
@@ -4843,8 +4843,8 @@ init_decl_processing ()
TREE_TYPE
(
void_zero_node
)
=
void_type_node
;
TREE_TYPE
(
void_zero_node
)
=
void_type_node
;
string_type_node
=
build_pointer_type
(
char_type_node
);
string_type_node
=
build_pointer_type
(
char_type_node
);
const_string_type_node
=
const_string_type_node
build_pointer_type
(
build_type_variant
(
char_type_node
,
1
,
0
));
=
build_pointer_type
(
build_type_variant
(
char_type_node
,
1
,
0
));
#if 0
#if 0
record_builtin_type (RID_MAX, NULL_PTR, string_type_node);
record_builtin_type (RID_MAX, NULL_PTR, string_type_node);
#endif
#endif
...
@@ -4873,8 +4873,8 @@ init_decl_processing ()
...
@@ -4873,8 +4873,8 @@ init_decl_processing ()
=
build_function_type
(
integer_type_node
,
NULL_TREE
);
=
build_function_type
(
integer_type_node
,
NULL_TREE
);
ptr_type_node
=
build_pointer_type
(
void_type_node
);
ptr_type_node
=
build_pointer_type
(
void_type_node
);
const_ptr_type_node
=
const_ptr_type_node
build_pointer_type
(
build_type_variant
(
void_type_node
,
1
,
0
));
=
build_pointer_type
(
build_type_variant
(
void_type_node
,
1
,
0
));
#if 0
#if 0
record_builtin_type (RID_MAX, NULL_PTR, ptr_type_node);
record_builtin_type (RID_MAX, NULL_PTR, ptr_type_node);
#endif
#endif
...
@@ -4964,9 +4964,9 @@ init_decl_processing ()
...
@@ -4964,9 +4964,9 @@ init_decl_processing ()
builtin_function
(
"__builtin_constant_p"
,
int_ftype_int
,
builtin_function
(
"__builtin_constant_p"
,
int_ftype_int
,
BUILT_IN_CONSTANT_P
,
NULL_PTR
);
BUILT_IN_CONSTANT_P
,
NULL_PTR
);
builtin_return_address_fndecl
=
builtin_return_address_fndecl
builtin_function
(
"__builtin_return_address"
,
ptr_ftype_unsigned
,
=
builtin_function
(
"__builtin_return_address"
,
ptr_ftype_unsigned
,
BUILT_IN_RETURN_ADDRESS
,
NULL_PTR
);
BUILT_IN_RETURN_ADDRESS
,
NULL_PTR
);
builtin_function
(
"__builtin_frame_address"
,
ptr_ftype_unsigned
,
builtin_function
(
"__builtin_frame_address"
,
ptr_ftype_unsigned
,
BUILT_IN_FRAME_ADDRESS
,
NULL_PTR
);
BUILT_IN_FRAME_ADDRESS
,
NULL_PTR
);
...
@@ -5278,12 +5278,15 @@ init_decl_processing ()
...
@@ -5278,12 +5278,15 @@ init_decl_processing ()
__t_desc_type_node = make_lang_type (RECORD_TYPE);
__t_desc_type_node = make_lang_type (RECORD_TYPE);
__i_desc_type_node = make_lang_type (RECORD_TYPE);
__i_desc_type_node = make_lang_type (RECORD_TYPE);
__m_desc_type_node = make_lang_type (RECORD_TYPE);
__m_desc_type_node = make_lang_type (RECORD_TYPE);
__t_desc_array_type =
__t_desc_array_type
build_array_type (build_pointer_type (__t_desc_type_node), NULL_TREE);
= build_array_type (build_pointer_type (__t_desc_type_node),
__i_desc_array_type =
NULL_TREE);
build_array_type (build_pointer_type (__i_desc_type_node), NULL_TREE);
__i_desc_array_type
__m_desc_array_type =
= build_array_type (build_pointer_type (__i_desc_type_node),
build_array_type (build_pointer_type (__m_desc_type_node), NULL_TREE);
NULL_TREE);
__m_desc_array_type
= build_array_type (build_pointer_type (__m_desc_type_node),
NULL_TREE);
fields[0] = build_lang_field_decl (FIELD_DECL, get_identifier ("name"),
fields[0] = build_lang_field_decl (FIELD_DECL, get_identifier ("name"),
string_type_node);
string_type_node);
...
@@ -6816,11 +6819,11 @@ expand_static_init (decl, init)
...
@@ -6816,11 +6819,11 @@ expand_static_init (decl, init)
pfvlist
=
tree_cons
(
NULL_TREE
,
PFV
,
void_list_node
);
pfvlist
=
tree_cons
(
NULL_TREE
,
PFV
,
void_list_node
);
push_lang_context
(
lang_name_c
);
push_lang_context
(
lang_name_c
);
atexit_fndecl
=
atexit_fndecl
builtin_function
(
"atexit"
,
=
builtin_function
(
"atexit"
,
build_function_type
(
void_type_node
,
build_function_type
(
void_type_node
,
pfvlist
),
pfvlist
),
NOT_BUILT_IN
,
NULL_PTR
);
NOT_BUILT_IN
,
NULL_PTR
);
assemble_external
(
atexit_fndecl
);
assemble_external
(
atexit_fndecl
);
Atexit
=
default_conversion
(
atexit_fndecl
);
Atexit
=
default_conversion
(
atexit_fndecl
);
pop_lang_context
();
pop_lang_context
();
...
@@ -7845,8 +7848,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
...
@@ -7845,8 +7848,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
}
}
else
if
(
RIDBIT_SETP
(
RID_TYPEDEF
,
specbits
))
else
if
(
RIDBIT_SETP
(
RID_TYPEDEF
,
specbits
))
pedwarn
(
"ANSI C++ forbids typedef which does not specify a type"
);
pedwarn
(
"ANSI C++ forbids typedef which does not specify a type"
);
else
if
(
declspecs
==
NULL_TREE
&&
else
if
(
declspecs
==
NULL_TREE
(
innermost_code
!=
CALL_EXPR
||
pedantic
))
&&
(
innermost_code
!=
CALL_EXPR
||
pedantic
))
cp_pedwarn
(
"ANSI C++ forbids declaration `%D' with no type or storage class"
,
cp_pedwarn
(
"ANSI C++ forbids declaration `%D' with no type or storage class"
,
dname
);
dname
);
type
=
integer_type_node
;
type
=
integer_type_node
;
...
@@ -8342,11 +8345,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
...
@@ -8342,11 +8345,11 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
}
}
}
}
itype
=
itype
fold
(
build_binary_op
(
MINUS_EXPR
,
=
fold
(
build_binary_op
(
MINUS_EXPR
,
convert
(
index_type
,
size
),
convert
(
index_type
,
size
),
convert
(
index_type
,
convert
(
index_type
,
integer_one_node
),
1
));
integer_one_node
),
1
));
if
(
!
TREE_CONSTANT
(
itype
))
if
(
!
TREE_CONSTANT
(
itype
))
itype
=
variable_size
(
itype
);
itype
=
variable_size
(
itype
);
else
if
(
TREE_OVERFLOW
(
itype
))
else
if
(
TREE_OVERFLOW
(
itype
))
...
@@ -8437,9 +8440,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
...
@@ -8437,9 +8440,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
/* Say it's a definition only for the CALL_EXPR
/* Say it's a definition only for the CALL_EXPR
closest to the identifier. */
closest to the identifier. */
funcdecl_p
=
funcdecl_p
inner_decl
&&
(
TREE_CODE
(
inner_decl
)
==
IDENTIFIER_NODE
=
inner_decl
&&
(
TREE_CODE
(
inner_decl
)
==
IDENTIFIER_NODE
||
TREE_CODE
(
inner_decl
)
==
BIT_NOT_EXPR
);
||
TREE_CODE
(
inner_decl
)
==
BIT_NOT_EXPR
);
if
(
ctype
==
NULL_TREE
if
(
ctype
==
NULL_TREE
&&
decl_context
==
FIELD
&&
decl_context
==
FIELD
...
@@ -8503,8 +8506,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
...
@@ -8503,8 +8506,8 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
error
(
"return value type specifier for constructor ignored"
);
error
(
"return value type specifier for constructor ignored"
);
}
}
type
=
build_pointer_type
(
ctype
);
type
=
build_pointer_type
(
ctype
);
if
(
decl_context
==
FIELD
&&
if
(
decl_context
==
FIELD
IS_SIGNATURE
(
current_class_type
))
&&
IS_SIGNATURE
(
current_class_type
))
{
{
error
(
"constructor not allowed in signature"
);
error
(
"constructor not allowed in signature"
);
return
void_type_node
;
return
void_type_node
;
...
@@ -8819,12 +8822,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
...
@@ -8819,12 +8822,12 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist)
else
if
(
uses_template_parms
(
ctype
))
else
if
(
uses_template_parms
(
ctype
))
{
{
if
(
TREE_CODE
(
type
)
==
FUNCTION_TYPE
)
if
(
TREE_CODE
(
type
)
==
FUNCTION_TYPE
)
type
=
type
build_cplus_method_type
(
build_type_variant
(
ctype
,
=
build_cplus_method_type
(
build_type_variant
(
ctype
,
constp
,
constp
,
volatilep
),
volatilep
),
TREE_TYPE
(
type
),
TREE_TYPE
(
type
),
TYPE_ARG_TYPES
(
type
));
TYPE_ARG_TYPES
(
type
));
}
}
else
else
{
{
...
@@ -9982,10 +9985,10 @@ grok_op_properties (decl, virtualp, friendp)
...
@@ -9982,10 +9985,10 @@ grok_op_properties (decl, virtualp, friendp)
/* Take care of function decl if we had syntax errors. */
/* Take care of function decl if we had syntax errors. */
if
(
argtypes
==
NULL_TREE
)
if
(
argtypes
==
NULL_TREE
)
TREE_TYPE
(
decl
)
=
TREE_TYPE
(
decl
)
build_function_type
(
ptr_type_node
,
=
build_function_type
(
ptr_type_node
,
hash_tree_chain
(
integer_type_node
,
hash_tree_chain
(
integer_type_node
,
void_list_node
));
void_list_node
));
else
else
TREE_TYPE
(
decl
)
=
coerce_new_type
(
TREE_TYPE
(
decl
));
TREE_TYPE
(
decl
)
=
coerce_new_type
(
TREE_TYPE
(
decl
));
}
}
...
@@ -9996,10 +9999,10 @@ grok_op_properties (decl, virtualp, friendp)
...
@@ -9996,10 +9999,10 @@ grok_op_properties (decl, virtualp, friendp)
revert_static_member_fn
(
&
decl
,
NULL
,
NULL
);
revert_static_member_fn
(
&
decl
,
NULL
,
NULL
);
if
(
argtypes
==
NULL_TREE
)
if
(
argtypes
==
NULL_TREE
)
TREE_TYPE
(
decl
)
=
TREE_TYPE
(
decl
)
build_function_type
(
void_type_node
,
=
build_function_type
(
void_type_node
,
hash_tree_chain
(
ptr_type_node
,
hash_tree_chain
(
ptr_type_node
,
void_list_node
));
void_list_node
));
else
else
{
{
TREE_TYPE
(
decl
)
=
coerce_delete_type
(
TREE_TYPE
(
decl
));
TREE_TYPE
(
decl
)
=
coerce_delete_type
(
TREE_TYPE
(
decl
));
...
@@ -11673,16 +11676,15 @@ finish_function (lineno, call_poplevel, nested)
...
@@ -11673,16 +11676,15 @@ finish_function (lineno, call_poplevel, nested)
/* At the end, call delete if that's what's requested. */
/* At the end, call delete if that's what's requested. */
if
(
TYPE_GETS_REG_DELETE
(
current_class_type
))
if
(
TYPE_GETS_REG_DELETE
(
current_class_type
))
/* This NOP_EXPR means we are in a static call context. */
/* This NOP_EXPR means we are in a static call context. */
exprstmt
=
exprstmt
build_method_call
=
build_method_call
(
build_indirect_ref
(
build1
(
NOP_EXPR
,
(
build_indirect_ref
build_pointer_type
(
current_class_type
),
(
build1
(
NOP_EXPR
,
build_pointer_type
(
current_class_type
),
error_mark_node
),
error_mark_node
),
NULL_PTR
),
NULL_PTR
),
ansi_opname
[(
int
)
DELETE_EXPR
],
ansi_opname
[(
int
)
DELETE_EXPR
],
tree_cons
(
NULL_TREE
,
current_class_ptr
,
tree_cons
(
NULL_TREE
,
current_class_ptr
,
build_tree_list
(
NULL_TREE
,
virtual_size
)),
build_tree_list
(
NULL_TREE
,
virtual_size
)),
NULL_TREE
,
LOOKUP_NORMAL
);
NULL_TREE
,
LOOKUP_NORMAL
);
else
if
(
TYPE_USES_VIRTUAL_BASECLASSES
(
current_class_type
))
else
if
(
TYPE_USES_VIRTUAL_BASECLASSES
(
current_class_type
))
exprstmt
=
build_x_delete
(
ptr_type_node
,
current_class_ptr
,
0
,
exprstmt
=
build_x_delete
(
ptr_type_node
,
current_class_ptr
,
0
,
virtual_size
);
virtual_size
);
...
...
gcc/cp/except.c
View file @
beb53fb8
...
@@ -265,32 +265,32 @@ init_exception_processing ()
...
@@ -265,32 +265,32 @@ init_exception_processing ()
push_lang_context
(
lang_name_c
);
push_lang_context
(
lang_name_c
);
catch_match_fndecl
=
catch_match_fndecl
builtin_function
(
flag_rtti
=
builtin_function
(
flag_rtti
?
"__throw_type_match_rtti"
?
"__throw_type_match_rtti"
:
"__throw_type_match"
,
:
"__throw_type_match"
,
build_function_type
(
ptr_type_node
,
build_function_type
(
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
void_list_node
)))),
void_list_node
)))),
NOT_BUILT_IN
,
NULL_PTR
);
NOT_BUILT_IN
,
NULL_PTR
);
find_first_exception_match_fndecl
=
find_first_exception_match_fndecl
builtin_function
(
"__find_first_exception_table_match"
,
=
builtin_function
(
"__find_first_exception_table_match"
,
build_function_type
(
ptr_type_node
,
build_function_type
(
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
void_list_node
)),
void_list_node
)),
NOT_BUILT_IN
,
NULL_PTR
);
NOT_BUILT_IN
,
NULL_PTR
);
unwind_fndecl
=
unwind_fndecl
builtin_function
(
"__unwind_function"
,
=
builtin_function
(
"__unwind_function"
,
build_function_type
(
void_type_node
,
build_function_type
(
void_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
tree_cons
(
NULL_TREE
,
ptr_type_node
,
void_list_node
)),
void_list_node
)),
NOT_BUILT_IN
,
NULL_PTR
);
NOT_BUILT_IN
,
NULL_PTR
);
empty_fndecl
=
empty_fndecl
builtin_function
(
"__empty"
,
=
builtin_function
(
"__empty"
,
build_function_type
(
void_type_node
,
void_list_node
),
build_function_type
(
void_type_node
,
void_list_node
),
NOT_BUILT_IN
,
NULL_PTR
);
NOT_BUILT_IN
,
NULL_PTR
);
DECL_EXTERNAL
(
empty_fndecl
)
=
1
;
DECL_EXTERNAL
(
empty_fndecl
)
=
1
;
TREE_PUBLIC
(
empty_fndecl
)
=
1
;
TREE_PUBLIC
(
empty_fndecl
)
=
1
;
...
...
gcc/cp/expr.c
View file @
beb53fb8
...
@@ -328,8 +328,8 @@ extract_scalar_init (decl, init)
...
@@ -328,8 +328,8 @@ extract_scalar_init (decl, init)
to
=
XEXP
(
r
,
0
);
to
=
XEXP
(
r
,
0
);
if
(
!
(
to
==
value
||
if
(
!
(
to
==
value
(
GET_CODE
(
to
)
==
SUBREG
&&
XEXP
(
to
,
0
)
==
value
)))
||
(
GET_CODE
(
to
)
==
SUBREG
&&
XEXP
(
to
,
0
)
==
value
)))
return
0
;
return
0
;
r
=
XEXP
(
r
,
1
);
r
=
XEXP
(
r
,
1
);
...
...
gcc/cp/friend.c
View file @
beb53fb8
...
@@ -202,10 +202,10 @@ add_friends (type, name, friend_type)
...
@@ -202,10 +202,10 @@ add_friends (type, name, friend_type)
}
}
list
=
TREE_CHAIN
(
list
);
list
=
TREE_CHAIN
(
list
);
}
}
DECL_FRIENDLIST
(
typedecl
)
=
DECL_FRIENDLIST
(
typedecl
)
tree_cons
(
name
,
=
tree_cons
(
name
,
build_tree_list
(
friend_type
,
NULL_TREE
),
build_tree_list
(
friend_type
,
NULL_TREE
),
DECL_FRIENDLIST
(
typedecl
));
DECL_FRIENDLIST
(
typedecl
));
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
name
),
if
(
!
strncmp
(
IDENTIFIER_POINTER
(
name
),
IDENTIFIER_POINTER
(
ansi_opname
[(
int
)
MODIFY_EXPR
]),
IDENTIFIER_POINTER
(
ansi_opname
[(
int
)
MODIFY_EXPR
]),
strlen
(
IDENTIFIER_POINTER
(
ansi_opname
[(
int
)
MODIFY_EXPR
]))))
strlen
(
IDENTIFIER_POINTER
(
ansi_opname
[(
int
)
MODIFY_EXPR
]))))
...
...
gcc/cp/init.c
View file @
beb53fb8
...
@@ -123,8 +123,8 @@ expand_direct_vtbls_init (real_binfo, binfo, init_self, can_elide, addr)
...
@@ -123,8 +123,8 @@ expand_direct_vtbls_init (real_binfo, binfo, init_self, can_elide, addr)
{
{
tree
real_base_binfo
=
TREE_VEC_ELT
(
real_binfos
,
i
);
tree
real_base_binfo
=
TREE_VEC_ELT
(
real_binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
real_binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
real_binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
real_base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
real_base_binfo
))
expand_direct_vtbls_init
(
real_base_binfo
,
base_binfo
,
expand_direct_vtbls_init
(
real_base_binfo
,
base_binfo
,
is_not_base_vtable
,
can_elide
,
addr
);
is_not_base_vtable
,
can_elide
,
addr
);
...
...
gcc/cp/method.c
View file @
beb53fb8
...
@@ -1632,8 +1632,8 @@ hack_identifier (value, name)
...
@@ -1632,8 +1632,8 @@ hack_identifier (value, name)
if
(
TREE_CODE
(
value
)
==
VAR_DECL
)
if
(
TREE_CODE
(
value
)
==
VAR_DECL
)
error
(
"static member `%s' is %s"
,
error
(
"static member `%s' is %s"
,
IDENTIFIER_POINTER
(
name
),
IDENTIFIER_POINTER
(
name
),
TREE_PRIVATE
(
value
)
?
"private"
:
TREE_PRIVATE
(
value
)
?
"private"
"from a private base class"
);
:
"from a private base class"
);
else
else
error
(
"enum `%s' is from private base class"
,
error
(
"enum `%s' is from private base class"
,
IDENTIFIER_POINTER
(
name
));
IDENTIFIER_POINTER
(
name
));
...
...
gcc/cp/pt.c
View file @
beb53fb8
...
@@ -1179,8 +1179,8 @@ instantiate_class_template (type)
...
@@ -1179,8 +1179,8 @@ instantiate_class_template (type)
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
BINFO_INHERITANCE_CHAIN
(
elt
)
=
binfo
;
BINFO_INHERITANCE_CHAIN
(
elt
)
=
binfo
;
if
(
!
uses_template_parms
(
type
)
&&
if
(
!
uses_template_parms
(
type
)
TYPE_SIZE
(
complete_type
(
TREE_TYPE
(
elt
)))
==
NULL_TREE
)
&&
TYPE_SIZE
(
complete_type
(
TREE_TYPE
(
elt
)))
==
NULL_TREE
)
cp_error
(
"base class `%T' of `%T' has incomplete type"
,
cp_error
(
"base class `%T' of `%T' has incomplete type"
,
TREE_TYPE
(
elt
),
type
);
TREE_TYPE
(
elt
),
type
);
}
}
...
@@ -1265,9 +1265,9 @@ instantiate_class_template (type)
...
@@ -1265,9 +1265,9 @@ instantiate_class_template (type)
&
TREE_VEC_ELT
(
args
,
0
),
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
&
TREE_VEC_ELT
(
args
,
0
),
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
{
{
tree
d
=
CLASSTYPE_FRIEND_CLASSES
(
type
)
=
tree
d
=
CLASSTYPE_FRIEND_CLASSES
(
type
)
tsubst
(
CLASSTYPE_FRIEND_CLASSES
(
pattern
),
&
TREE_VEC_ELT
(
args
,
0
),
=
tsubst
(
CLASSTYPE_FRIEND_CLASSES
(
pattern
),
&
TREE_VEC_ELT
(
args
,
0
),
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
TREE_VEC_LENGTH
(
args
),
NULL_TREE
);
/* This does injection for friend classes. */
/* This does injection for friend classes. */
for
(;
d
;
d
=
TREE_CHAIN
(
d
))
for
(;
d
;
d
=
TREE_CHAIN
(
d
))
...
@@ -1600,8 +1600,8 @@ tsubst (t, args, nargs, in_decl)
...
@@ -1600,8 +1600,8 @@ tsubst (t, args, nargs, in_decl)
else
else
SET_DECL_IMPLICIT_INSTANTIATION
(
r
);
SET_DECL_IMPLICIT_INSTANTIATION
(
r
);
DECL_TEMPLATE_INSTANTIATIONS
(
tmpl
)
=
DECL_TEMPLATE_INSTANTIATIONS
(
tmpl
)
tree_cons
(
argvec
,
r
,
DECL_TEMPLATE_INSTANTIATIONS
(
tmpl
));
=
tree_cons
(
argvec
,
r
,
DECL_TEMPLATE_INSTANTIATIONS
(
tmpl
));
}
}
/* Like grokfndecl. If we don't do this, pushdecl will mess up our
/* Like grokfndecl. If we don't do this, pushdecl will mess up our
...
...
gcc/cp/rtti.c
View file @
beb53fb8
...
@@ -441,8 +441,8 @@ build_dynamic_cast (type, expr)
...
@@ -441,8 +441,8 @@ build_dynamic_cast (type, expr)
goto
fail
;
goto
fail
;
if
(
TYPE_SIZE
(
TREE_TYPE
(
exprtype
))
==
NULL_TREE
)
if
(
TYPE_SIZE
(
TREE_TYPE
(
exprtype
))
==
NULL_TREE
)
goto
fail
;
goto
fail
;
if
(
TREE_READONLY
(
TREE_TYPE
(
exprtype
))
&&
if
(
TREE_READONLY
(
TREE_TYPE
(
exprtype
))
!
TYPE_READONLY
(
TREE_TYPE
(
type
)))
&&
!
TYPE_READONLY
(
TREE_TYPE
(
type
)))
goto
fail
;
goto
fail
;
if
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
type
))
==
void_type_node
)
if
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
type
))
==
void_type_node
)
break
;
break
;
...
@@ -477,8 +477,8 @@ build_dynamic_cast (type, expr)
...
@@ -477,8 +477,8 @@ build_dynamic_cast (type, expr)
goto
fail
;
goto
fail
;
if
(
TYPE_SIZE
(
TREE_TYPE
(
exprtype
))
==
NULL_TREE
)
if
(
TYPE_SIZE
(
TREE_TYPE
(
exprtype
))
==
NULL_TREE
)
goto
fail
;
goto
fail
;
if
(
TREE_READONLY
(
TREE_TYPE
(
exprtype
))
&&
if
(
TREE_READONLY
(
TREE_TYPE
(
exprtype
))
!
TYPE_READONLY
(
TREE_TYPE
(
type
)))
&&
!
TYPE_READONLY
(
TREE_TYPE
(
type
)))
goto
fail
;
goto
fail
;
}
}
...
@@ -833,8 +833,8 @@ expand_class_desc (tdecl, type)
...
@@ -833,8 +833,8 @@ expand_class_desc (tdecl, type)
{
{
tree
arrtype
=
build_array_type
(
base_info_type_node
,
NULL_TREE
);
tree
arrtype
=
build_array_type
(
base_info_type_node
,
NULL_TREE
);
elts
=
build
(
CONSTRUCTOR
,
arrtype
,
NULL_TREE
,
elts
);
elts
=
build
(
CONSTRUCTOR
,
arrtype
,
NULL_TREE
,
elts
);
TREE_HAS_CONSTRUCTOR
(
elts
)
=
TREE_CONSTANT
(
elts
)
=
TREE_HAS_CONSTRUCTOR
(
elts
)
=
TREE_CONSTANT
(
elts
)
TREE_STATIC
(
elts
)
=
1
;
=
TREE_STATIC
(
elts
)
=
1
;
complete_array_type
(
arrtype
,
elts
,
1
);
complete_array_type
(
arrtype
,
elts
,
1
);
}
}
...
...
gcc/cp/search.c
View file @
beb53fb8
...
@@ -245,9 +245,9 @@ static struct memoized_entry *
...
@@ -245,9 +245,9 @@ static struct memoized_entry *
my_new_memoized_entry
(
chain
)
my_new_memoized_entry
(
chain
)
struct
memoized_entry
*
chain
;
struct
memoized_entry
*
chain
;
{
{
struct
memoized_entry
*
p
=
struct
memoized_entry
*
p
(
struct
memoized_entry
*
)
obstack_alloc
(
&
type_obstack_entries
,
=
(
struct
memoized_entry
*
)
obstack_alloc
(
&
type_obstack_entries
,
sizeof
(
struct
memoized_entry
));
sizeof
(
struct
memoized_entry
));
bzero
((
char
*
)
p
,
sizeof
(
struct
memoized_entry
));
bzero
((
char
*
)
p
,
sizeof
(
struct
memoized_entry
));
MEMOIZED_CHAIN
(
p
)
=
chain
;
MEMOIZED_CHAIN
(
p
)
=
chain
;
MEMOIZED_UID
(
p
)
=
++
my_memoized_entry_counter
;
MEMOIZED_UID
(
p
)
=
++
my_memoized_entry_counter
;
...
@@ -854,9 +854,9 @@ compute_access (basetype_path, field)
...
@@ -854,9 +854,9 @@ compute_access (basetype_path, field)
/* Replaces static decl above. */
/* Replaces static decl above. */
tree
previous_scope
;
tree
previous_scope
;
#endif
#endif
int
static_mem
=
int
static_mem
((
TREE_CODE
(
field
)
==
FUNCTION_DECL
&&
DECL_STATIC_FUNCTION_P
(
field
))
=
((
TREE_CODE
(
field
)
==
FUNCTION_DECL
&&
DECL_STATIC_FUNCTION_P
(
field
))
||
(
TREE_CODE
(
field
)
!=
FUNCTION_DECL
&&
TREE_STATIC
(
field
)));
||
(
TREE_CODE
(
field
)
!=
FUNCTION_DECL
&&
TREE_STATIC
(
field
)));
if
(
!
flag_access_control
)
if
(
!
flag_access_control
)
return
access_public_node
;
return
access_public_node
;
...
@@ -2182,8 +2182,8 @@ get_abstract_virtuals_1 (binfo, do_self, abstract_virtuals)
...
@@ -2182,8 +2182,8 @@ get_abstract_virtuals_1 (binfo, do_self, abstract_virtuals)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
for
(
i
=
0
;
i
<
n_baselinks
;
i
++
)
{
{
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
base_binfo
))
abstract_virtuals
abstract_virtuals
=
get_abstract_virtuals_1
(
base_binfo
,
is_not_base_vtable
,
=
get_abstract_virtuals_1
(
base_binfo
,
is_not_base_vtable
,
...
@@ -2887,8 +2887,8 @@ fixup_virtual_upcast_offsets (real_binfo, binfo, init_self, can_elide, addr, ori
...
@@ -2887,8 +2887,8 @@ fixup_virtual_upcast_offsets (real_binfo, binfo, init_self, can_elide, addr, ori
{
{
tree
real_base_binfo
=
TREE_VEC_ELT
(
real_binfos
,
i
);
tree
real_base_binfo
=
TREE_VEC_ELT
(
real_binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
tree
base_binfo
=
TREE_VEC_ELT
(
binfos
,
i
);
int
is_not_base_vtable
=
int
is_not_base_vtable
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
real_binfo
));
=
i
!=
CLASSTYPE_VFIELD_PARENT
(
BINFO_TYPE
(
real_binfo
));
if
(
!
TREE_VIA_VIRTUAL
(
real_base_binfo
))
if
(
!
TREE_VIA_VIRTUAL
(
real_base_binfo
))
fixup_virtual_upcast_offsets
(
real_base_binfo
,
base_binfo
,
fixup_virtual_upcast_offsets
(
real_base_binfo
,
base_binfo
,
is_not_base_vtable
,
can_elide
,
addr
,
is_not_base_vtable
,
can_elide
,
addr
,
...
...
gcc/cp/sig.c
View file @
beb53fb8
...
@@ -400,8 +400,8 @@ match_method_types (sig_mtype, class_mtype)
...
@@ -400,8 +400,8 @@ match_method_types (sig_mtype, class_mtype)
/* Compare the first argument `this.' */
/* Compare the first argument `this.' */
{
{
/* Get the type of what the `optr' is pointing to. */
/* Get the type of what the `optr' is pointing to. */
tree
sig_this
=
tree
sig_this
TREE_TYPE
(
TREE_TYPE
(
TYPE_FIELDS
(
TREE_VALUE
(
sig_arg_types
))));
=
TREE_TYPE
(
TREE_TYPE
(
TYPE_FIELDS
(
TREE_VALUE
(
sig_arg_types
))));
tree
class_this
=
TREE_VALUE
(
class_arg_types
);
tree
class_this
=
TREE_VALUE
(
class_arg_types
);
if
(
TREE_CODE
(
class_this
)
==
RECORD_TYPE
)
/* Is `this' a sig ptr? */
if
(
TREE_CODE
(
class_this
)
==
RECORD_TYPE
)
/* Is `this' a sig ptr? */
...
@@ -790,9 +790,9 @@ build_signature_pointer_constructor (lhs, rhs)
...
@@ -790,9 +790,9 @@ build_signature_pointer_constructor (lhs, rhs)
if
(
!
((
TREE_CODE
(
rhstype
)
==
POINTER_TYPE
if
(
!
((
TREE_CODE
(
rhstype
)
==
POINTER_TYPE
&&
TREE_CODE
(
TREE_TYPE
(
rhstype
))
==
RECORD_TYPE
)
&&
TREE_CODE
(
TREE_TYPE
(
rhstype
))
==
RECORD_TYPE
)
||
(
TYPE_LANG_SPECIFIC
(
rhstype
)
&&
||
(
TYPE_LANG_SPECIFIC
(
rhstype
)
(
IS_SIGNATURE_POINTER
(
rhstype
)
&&
(
IS_SIGNATURE_POINTER
(
rhstype
)
||
IS_SIGNATURE_REFERENCE
(
rhstype
)))))
||
IS_SIGNATURE_REFERENCE
(
rhstype
)))))
{
{
error
(
"invalid assignment to signature pointer or reference"
);
error
(
"invalid assignment to signature pointer or reference"
);
return
error_mark_node
;
return
error_mark_node
;
...
@@ -814,8 +814,8 @@ build_signature_pointer_constructor (lhs, rhs)
...
@@ -814,8 +814,8 @@ build_signature_pointer_constructor (lhs, rhs)
saveable_obstack
=
&
permanent_obstack
;
saveable_obstack
=
&
permanent_obstack
;
}
}
if
(
TYPE_LANG_SPECIFIC
(
rhstype
)
&&
if
(
TYPE_LANG_SPECIFIC
(
rhstype
)
(
IS_SIGNATURE_POINTER
(
rhstype
)
||
IS_SIGNATURE_REFERENCE
(
rhstype
)))
&&
(
IS_SIGNATURE_POINTER
(
rhstype
)
||
IS_SIGNATURE_REFERENCE
(
rhstype
)))
{
{
if
(
SIGNATURE_TYPE
(
rhstype
)
==
sig_ty
)
if
(
SIGNATURE_TYPE
(
rhstype
)
==
sig_ty
)
{
{
...
@@ -968,10 +968,10 @@ build_signature_method_call (function, parms)
...
@@ -968,10 +968,10 @@ build_signature_method_call (function, parms)
/* Cast the signature method to have `this' of a normal pointer type. */
/* Cast the signature method to have `this' of a normal pointer type. */
tree
old_this
=
TREE_VALUE
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
TREE_TYPE
(
pfn
))));
tree
old_this
=
TREE_VALUE
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
TREE_TYPE
(
pfn
))));
TREE_VALUE
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
TREE_TYPE
(
pfn
))))
=
TREE_VALUE
(
TYPE_ARG_TYPES
(
TREE_TYPE
(
TREE_TYPE
(
pfn
))))
build_type_variant
(
build_pointer_type
(
basetype
),
=
build_type_variant
(
build_pointer_type
(
basetype
),
TYPE_READONLY
(
old_this
),
TYPE_READONLY
(
old_this
),
TYPE_VOLATILE
(
old_this
));
TYPE_VOLATILE
(
old_this
));
direct_call
=
build_function_call
(
pfn
,
new_parms
);
direct_call
=
build_function_call
(
pfn
,
new_parms
);
...
...
gcc/cp/typeck.c
View file @
beb53fb8
...
@@ -4397,8 +4397,8 @@ build_unary_op (code, xarg, noconvert)
...
@@ -4397,8 +4397,8 @@ build_unary_op (code, xarg, noconvert)
if
(
staticp
(
arg
))
if
(
staticp
(
arg
))
TREE_CONSTANT
(
addr
)
=
1
;
TREE_CONSTANT
(
addr
)
=
1
;
if
(
TREE_CODE
(
argtype
)
==
POINTER_TYPE
&&
if
(
TREE_CODE
(
argtype
)
==
POINTER_TYPE
TREE_CODE
(
TREE_TYPE
(
argtype
))
==
METHOD_TYPE
)
&&
TREE_CODE
(
TREE_TYPE
(
argtype
))
==
METHOD_TYPE
)
{
{
build_ptrmemfunc_type
(
argtype
);
build_ptrmemfunc_type
(
argtype
);
addr
=
build_ptrmemfunc
(
argtype
,
addr
,
0
);
addr
=
build_ptrmemfunc
(
argtype
,
addr
,
0
);
...
@@ -5575,8 +5575,8 @@ build_modify_expr (lhs, modifycode, rhs)
...
@@ -5575,8 +5575,8 @@ build_modify_expr (lhs, modifycode, rhs)
/* Handle assignment to signature pointers/refs. */
/* Handle assignment to signature pointers/refs. */
if
(
TYPE_LANG_SPECIFIC
(
lhstype
)
&&
if
(
TYPE_LANG_SPECIFIC
(
lhstype
)
(
IS_SIGNATURE_POINTER
(
lhstype
)
||
IS_SIGNATURE_REFERENCE
(
lhstype
)))
&&
(
IS_SIGNATURE_POINTER
(
lhstype
)
||
IS_SIGNATURE_REFERENCE
(
lhstype
)))
{
{
return
build_signature_pointer_constructor
(
lhs
,
rhs
);
return
build_signature_pointer_constructor
(
lhs
,
rhs
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment