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
5b605f68
Commit
5b605f68
authored
Jul 09, 1994
by
Mike Stump
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
44th Cygnus<->FSF merge
From-SVN: r7693
parent
971ba70d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
146 additions
and
109 deletions
+146
-109
gcc/cp/ChangeLog
+59
-0
gcc/cp/call.c
+10
-1
gcc/cp/class.c
+4
-6
gcc/cp/decl.c
+34
-60
gcc/cp/decl2.c
+20
-13
gcc/cp/method.c
+4
-4
gcc/cp/tree.c
+3
-1
gcc/cp/typeck.c
+11
-23
gcc/cp/typeck2.c
+1
-1
No files found.
gcc/cp/ChangeLog
View file @
5b605f68
Fri Jul 8 17:41:46 1994 Mike Stump (mrs@cygnus.com)
* decl.c (cplus_expand_expr_stmt): Wrap statement expressions inside
CLEANUP_POINT_EXPRs so that the stack slots can be reused.
Fri Jul 8 12:59:38 1994 Jason Merrill (jason@deneb.cygnus.com)
* method.c (hack_identifier): Fix for new overloading.
* typeck.c (build_binary_op_nodefault): Don't mess with division by
zero.
Fri Jul 8 13:20:28 1994 Gerald Baumgartner (gb@cs.purdue.edu)
* decl2.c (finish_file): Only call walk_sigtables, if
flag_handle_signatures is turned on, don't waste time otherwise.
Fri Jul 8 02:27:41 1994 Jason Merrill (jason@deneb.cygnus.com)
* decl.c (push_overloaded_decl): Don't create overloads of one when
shadowing a class type.
* typeck.c (build_x_function_call): Complain about overloads of one
* decl.c (grokdeclarator): Don't try to treat a char* as a tree.
(grokdeclarator): Fix setting of TREE_STATIC.
(start_decl): Clear DECL_IN_AGGR_P after calling duplicate_decls.
Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
* cp-tree.h (walk_sigtables): Created extern declaration.
* cp-tree.h (walk_sigtables): Created extern declaration.
...
@@ -10,6 +37,22 @@ Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
...
@@ -10,6 +37,22 @@ Thu Jul 7 22:20:46 1994 Gerald Baumgartner (gb@andros.cygnus.com)
* sig.c (build_signature_table_constructor): Mark class member
* sig.c (build_signature_table_constructor): Mark class member
function pointed to from signature table entry as addressable.
function pointed to from signature table entry as addressable.
Thu Jul 7 13:39:37 1994 Jason Merrill (jason@deneb.cygnus.com)
* decl.c (start_decl): Check new decl of static member variable
against the declaration in the class here.
(grokvardecl): Instead of here.
* class.c (prepare_fresh_vtable): Call import_export_vtable if not
-fvtable-thunks.
(build_vtable): Ditto.
* decl2.c (import_export_vtable): Move logic for deciding the
interface of a template class from here.
(import_export_template): To here.
(finish_vtable_vardecl): Call import_export_template before
import_export_vtable.
Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
Wed Jul 6 20:25:48 1994 Mike Stump (mrs@cygnus.com)
* except.c (init_exception_processing): Setup interim_eh_hook to
* except.c (init_exception_processing): Setup interim_eh_hook to
...
@@ -31,6 +74,22 @@ Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
...
@@ -31,6 +74,22 @@ Wed Jul 6 17:55:32 1994 Per Bothner (bothner@kalessin.cygnus.com)
* decl2.c (mark_vtable_entries): If -ftable-thunks, set the
* decl2.c (mark_vtable_entries): If -ftable-thunks, set the
vtable entry properly to abort.
vtable entry properly to abort.
Tue Jul 5 14:07:54 1994 Jason Merrill (jason@deneb.cygnus.com)
* typeck.c (build_binary_op_nodefault): Downgrade division by zero
errors to warnings.
* call.c (build_overload_call_real): Handle fnname being a list of
functions.
* typeck.c (build_x_function_call): Pass list of functions to
build_overload_call, not just the name.
* tree.c (count_functions): Complain when called for invalid
argument.
* decl.c (grokdeclarator): Fix settings of TREE_STATIC, TREE_PUBLIC
and DECL_EXTERNAL on static members and initialized const members.
* decl2.c (grokfield): Reflect this change.
Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
Fri Jul 1 09:35:51 1994 Jason Merrill (jason@deneb.cygnus.com)
* parse.y (init): ANSI C++ does not forbid { }.
* parse.y (init): ANSI C++ does not forbid { }.
...
...
gcc/cp/call.c
View file @
5b605f68
...
@@ -2680,7 +2680,16 @@ build_overload_call_real (fnname, parms, flags, final_cp, buildxxx)
...
@@ -2680,7 +2680,16 @@ build_overload_call_real (fnname, parms, flags, final_cp, buildxxx)
else
else
parmtypes
=
void_list_node
;
parmtypes
=
void_list_node
;
functions
=
lookup_name_nonclass
(
fnname
);
if
(
is_overloaded_fn
(
fnname
))
{
functions
=
fnname
;
if
(
TREE_CODE
(
fnname
)
==
TREE_LIST
)
fnname
=
TREE_PURPOSE
(
functions
);
else
if
(
TREE_CODE
(
fnname
)
==
FUNCTION_DECL
)
fnname
=
DECL_NAME
(
functions
);
}
else
functions
=
lookup_name_nonclass
(
fnname
);
if
(
functions
==
NULL_TREE
)
if
(
functions
==
NULL_TREE
)
{
{
...
...
gcc/cp/class.c
View file @
5b605f68
...
@@ -547,10 +547,9 @@ build_vtable (binfo, type)
...
@@ -547,10 +547,9 @@ build_vtable (binfo, type)
n_vtable_elems
+=
list_length
(
virtuals
);
n_vtable_elems
+=
list_length
(
virtuals
);
#endif
#endif
#if 0 /* Now done from finish_vtable_vardecl */
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
i
mport_export_vtable (decl, type);
i
f
(
!
flag_vtable_thunks
)
#endif
import_export_vtable
(
decl
,
type
);
IDENTIFIER_GLOBAL_VALUE
(
name
)
=
decl
=
pushdecl_top_level
(
decl
);
IDENTIFIER_GLOBAL_VALUE
(
name
)
=
decl
=
pushdecl_top_level
(
decl
);
/* Initialize the association list for this type, based
/* Initialize the association list for this type, based
...
@@ -688,10 +687,9 @@ prepare_fresh_vtable (binfo, for_type)
...
@@ -688,10 +687,9 @@ prepare_fresh_vtable (binfo, for_type)
n_vtable_elems
+=
list_length
(
BINFO_VIRTUALS
(
binfo
));
n_vtable_elems
+=
list_length
(
BINFO_VIRTUALS
(
binfo
));
#endif
#endif
#if 0 /* Now done in finish_vtable_vardecl */
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
/* Set TREE_PUBLIC and TREE_EXTERN as appropriate. */
i
mport_export_vtable (new_decl, for_type);
i
f
(
!
flag_vtable_thunks
)
#endif
import_export_vtable
(
new_decl
,
for_type
);
if
(
TREE_VIA_VIRTUAL
(
binfo
))
if
(
TREE_VIA_VIRTUAL
(
binfo
))
my_friendly_assert
(
binfo
==
binfo_member
(
BINFO_TYPE
(
binfo
),
my_friendly_assert
(
binfo
==
binfo_member
(
BINFO_TYPE
(
binfo
),
...
...
gcc/cp/decl.c
View file @
5b605f68
...
@@ -3250,6 +3250,7 @@ push_overloaded_decl (decl, forgettable)
...
@@ -3250,6 +3250,7 @@ push_overloaded_decl (decl, forgettable)
tree
t
=
TREE_TYPE
(
old
);
tree
t
=
TREE_TYPE
(
old
);
if
(
IS_AGGR_TYPE
(
t
)
&&
warn_shadow
)
if
(
IS_AGGR_TYPE
(
t
)
&&
warn_shadow
)
cp_warning
(
"`%#D' hides constructor for `%#T'"
,
decl
,
t
);
cp_warning
(
"`%#D' hides constructor for `%#T'"
,
decl
,
t
);
old
=
NULL_TREE
;
}
}
else
if
(
is_overloaded_fn
(
old
))
else
if
(
is_overloaded_fn
(
old
))
{
{
...
@@ -5263,17 +5264,6 @@ start_decl (declarator, declspecs, initialized, raises)
...
@@ -5263,17 +5264,6 @@ start_decl (declarator, declspecs, initialized, raises)
decl
=
d
;
decl
=
d
;
}
}
if
(
context
&&
TYPE_SIZE
(
context
)
!=
NULL_TREE
)
{
/* If it was not explicitly declared `extern',
revoke any previous claims of DECL_EXTERNAL. */
if
(
DECL_THIS_EXTERN
(
decl
)
==
0
)
DECL_EXTERNAL
(
decl
)
=
0
;
if
(
DECL_LANG_SPECIFIC
(
decl
))
DECL_IN_AGGR_P
(
decl
)
=
0
;
pushclass
(
context
,
2
);
}
/* If this type of object needs a cleanup, and control may
/* If this type of object needs a cleanup, and control may
jump past it, make a new binding level so that it is cleaned
jump past it, make a new binding level so that it is cleaned
up only when it is initialized first. */
up only when it is initialized first. */
...
@@ -5365,9 +5355,30 @@ start_decl (declarator, declspecs, initialized, raises)
...
@@ -5365,9 +5355,30 @@ start_decl (declarator, declspecs, initialized, raises)
DECL_INITIAL
(
decl
)
=
error_mark_node
;
DECL_INITIAL
(
decl
)
=
error_mark_node
;
}
}
if
(
context
&&
TYPE_SIZE
(
context
)
!=
NULL_TREE
)
{
if
(
TREE_CODE
(
decl
)
==
VAR_DECL
)
{
tree
field
=
lookup_field
(
context
,
DECL_NAME
(
decl
),
0
,
0
);
if
(
field
==
NULL_TREE
||
TREE_CODE
(
field
)
!=
VAR_DECL
)
cp_error
(
"`%#D' is not a static member of `%#T'"
,
decl
,
context
);
else
if
(
duplicate_decls
(
decl
,
field
))
decl
=
field
;
}
/* If it was not explicitly declared `extern',
revoke any previous claims of DECL_EXTERNAL. */
if
(
DECL_THIS_EXTERN
(
decl
)
==
0
)
DECL_EXTERNAL
(
decl
)
=
0
;
if
(
DECL_LANG_SPECIFIC
(
decl
))
DECL_IN_AGGR_P
(
decl
)
=
0
;
pushclass
(
context
,
2
);
}
/* Add this decl to the current binding level, but not if it
/* Add this decl to the current binding level, but not if it
comes from another scope, e.g. a static member variable.
comes from another scope, e.g. a static member variable.
TEM may equal DECL or it may be a previous decl of the same name. */
TEM may equal DECL or it may be a previous decl of the same name. */
if
((
TREE_CODE
(
decl
)
!=
PARM_DECL
&&
DECL_CONTEXT
(
decl
)
!=
NULL_TREE
)
if
((
TREE_CODE
(
decl
)
!=
PARM_DECL
&&
DECL_CONTEXT
(
decl
)
!=
NULL_TREE
)
||
(
TREE_CODE
(
decl
)
==
TEMPLATE_DECL
&&
!
global_bindings_p
())
||
(
TREE_CODE
(
decl
)
==
TEMPLATE_DECL
&&
!
global_bindings_p
())
||
TREE_CODE
(
type
)
==
LANG_TYPE
)
||
TREE_CODE
(
type
)
==
LANG_TYPE
)
...
@@ -6779,47 +6790,11 @@ grokvardecl (type, declarator, specbits, initialized)
...
@@ -6779,47 +6790,11 @@ grokvardecl (type, declarator, specbits, initialized)
{
{
/* If you declare a static member so that it
/* If you declare a static member so that it
can be initialized, the code will reach here. */
can be initialized, the code will reach here. */
tree
field
=
lookup_field
(
TYPE_OFFSET_BASETYPE
(
type
),
tree
basetype
=
TYPE_OFFSET_BASETYPE
(
type
);
declarator
,
0
,
0
);
type
=
TREE_TYPE
(
type
);
if
(
field
==
NULL_TREE
||
TREE_CODE
(
field
)
!=
VAR_DECL
)
decl
=
build_lang_field_decl
(
VAR_DECL
,
declarator
,
type
);
{
DECL_CONTEXT
(
decl
)
=
basetype
;
tree
basetype
=
TYPE_OFFSET_BASETYPE
(
type
);
DECL_CLASS_CONTEXT
(
decl
)
=
basetype
;
error
(
"`%s' is not a static member of class `%s'"
,
IDENTIFIER_POINTER
(
declarator
),
TYPE_NAME_STRING
(
basetype
));
type
=
TREE_TYPE
(
type
);
decl
=
build_lang_field_decl
(
VAR_DECL
,
declarator
,
type
);
DECL_CONTEXT
(
decl
)
=
basetype
;
DECL_CLASS_CONTEXT
(
decl
)
=
basetype
;
}
else
{
tree
f_type
=
TREE_TYPE
(
field
);
tree
o_type
=
TREE_TYPE
(
type
);
if
(
TYPE_SIZE
(
f_type
)
==
NULL_TREE
)
{
if
(
TREE_CODE
(
f_type
)
!=
TREE_CODE
(
o_type
)
||
(
TREE_CODE
(
f_type
)
==
ARRAY_TYPE
&&
TREE_TYPE
(
f_type
)
!=
TREE_TYPE
(
o_type
)))
error
(
"redeclaration of type for `%s'"
,
IDENTIFIER_POINTER
(
declarator
));
else
if
(
TYPE_SIZE
(
o_type
)
!=
NULL_TREE
)
TREE_TYPE
(
field
)
=
type
;
}
else
if
(
f_type
!=
o_type
)
error
(
"redeclaration of type for `%s'"
,
IDENTIFIER_POINTER
(
declarator
));
decl
=
field
;
if
(
initialized
&&
DECL_INITIAL
(
decl
)
/* Complain about multiply-initialized
member variables, but don't be faked
out if initializer is empty. */
&&
!
EMPTY_CONSTRUCTOR_P
(
DECL_INITIAL
(
decl
)))
error_with_aggr_type
(
DECL_CONTEXT
(
decl
),
"multiple initializations of static member `%s::%s'"
,
IDENTIFIER_POINTER
(
DECL_NAME
(
decl
)));
}
}
}
else
else
decl
=
build_decl
(
VAR_DECL
,
declarator
,
type
);
decl
=
build_decl
(
VAR_DECL
,
declarator
,
type
);
...
@@ -6837,7 +6812,7 @@ grokvardecl (type, declarator, specbits, initialized)
...
@@ -6837,7 +6812,7 @@ grokvardecl (type, declarator, specbits, initialized)
{
{
TREE_PUBLIC
(
decl
)
=
1
;
TREE_PUBLIC
(
decl
)
=
1
;
TREE_STATIC
(
decl
)
=
1
;
TREE_STATIC
(
decl
)
=
1
;
DECL_EXTERNAL
(
decl
)
=
!
initialized
;
DECL_EXTERNAL
(
decl
)
=
0
;
}
}
/* At top level, either `static' or no s.c. makes a definition
/* At top level, either `static' or no s.c. makes a definition
(perhaps tentative), and absence of `static' makes it public. */
(perhaps tentative), and absence of `static' makes it public. */
...
@@ -8400,7 +8375,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
...
@@ -8400,7 +8375,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
TREE_TYPE
(
type
),
TYPE_ARG_TYPES
(
type
));
TREE_TYPE
(
type
),
TYPE_ARG_TYPES
(
type
));
else
else
{
{
cp_error
(
"cannot declare member function `%T::%
D
' within `%T'"
,
cp_error
(
"cannot declare member function `%T::%
s
' within `%T'"
,
ctype
,
name
,
current_class_type
);
ctype
,
name
,
current_class_type
);
return
void_type_node
;
return
void_type_node
;
}
}
...
@@ -8408,7 +8383,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
...
@@ -8408,7 +8383,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
else
if
(
TYPE_MAIN_VARIANT
(
ctype
)
==
current_class_type
)
else
if
(
TYPE_MAIN_VARIANT
(
ctype
)
==
current_class_type
)
{
{
if
(
extra_warnings
)
if
(
extra_warnings
)
cp_warning
(
"redundant qualification `%T' on member `%
D
' ignored"
,
cp_warning
(
"redundant qualification `%T' on member `%
s
' ignored"
,
ctype
,
name
);
ctype
,
name
);
type
=
build_offset_type
(
ctype
,
type
);
type
=
build_offset_type
(
ctype
,
type
);
}
}
...
@@ -8920,11 +8895,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
...
@@ -8920,11 +8895,9 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, raises)
This VAR_DECL is built by build_lang_field_decl.
This VAR_DECL is built by build_lang_field_decl.
All other VAR_DECLs are built by build_decl. */
All other VAR_DECLs are built by build_decl. */
decl
=
build_lang_field_decl
(
VAR_DECL
,
declarator
,
type
);
decl
=
build_lang_field_decl
(
VAR_DECL
,
declarator
,
type
);
if
(
staticp
||
TREE_CODE
(
type
)
==
ARRAY_TYPE
)
TREE_STATIC
(
decl
)
=
1
;
TREE_STATIC
(
decl
)
=
1
;
/* In class context, 'static' means public access. */
/* In class context, static means public access. */
TREE_PUBLIC
(
decl
)
=
DECL_EXTERNAL
(
decl
)
=
!!
staticp
;
TREE_PUBLIC
(
decl
)
=
1
;
DECL_EXTERNAL
(
decl
)
=
!!
staticp
;
}
}
else
else
{
{
...
@@ -11980,6 +11953,7 @@ cplus_expand_expr_stmt (exp)
...
@@ -11980,6 +11953,7 @@ cplus_expand_expr_stmt (exp)
warning
(
"at this point in file"
);
warning
(
"at this point in file"
);
}
}
exp
=
build1
(
CLEANUP_POINT_EXPR
,
TREE_TYPE
(
exp
),
exp
);
expand_expr_stmt
(
break_out_cleanups
(
exp
));
expand_expr_stmt
(
break_out_cleanups
(
exp
));
}
}
...
...
gcc/cp/decl2.c
View file @
5b605f68
...
@@ -1244,7 +1244,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
...
@@ -1244,7 +1244,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
grok_function_init
(
value
,
init
);
grok_function_init
(
value
,
init
);
init
=
NULL_TREE
;
init
=
NULL_TREE
;
}
}
else
if
(
pedantic
&&
!
TREE_STATIC
(
value
)
)
else
if
(
pedantic
&&
TREE_CODE
(
value
)
!=
VAR_DECL
)
/* Already complained in grokdeclarator. */
/* Already complained in grokdeclarator. */
init
=
NULL_TREE
;
init
=
NULL_TREE
;
else
else
...
@@ -1296,7 +1296,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
...
@@ -1296,7 +1296,7 @@ grokfield (declarator, declspecs, raises, init, asmspec_tree)
fill in the value of our TREE_CHAIN. Instead, we
fill in the value of our TREE_CHAIN. Instead, we
modify finish_decl to do the right thing, namely, to
modify finish_decl to do the right thing, namely, to
put this decl out straight away. */
put this decl out straight away. */
if
(
TREE_
STAT
IC
(
value
))
if
(
TREE_
PUBL
IC
(
value
))
{
{
/* current_class_type can be NULL_TREE in case of error. */
/* current_class_type can be NULL_TREE in case of error. */
if
(
asmspec
==
0
&&
current_class_type
)
if
(
asmspec
==
0
&&
current_class_type
)
...
@@ -2335,22 +2335,13 @@ mark_vtable_entries (decl)
...
@@ -2335,22 +2335,13 @@ mark_vtable_entries (decl)
Note that anything public is tagged TREE_PUBLIC, whether
Note that anything public is tagged TREE_PUBLIC, whether
it's public in this file or in another one. */
it's public in this file or in another one. */
static
void
void
import_export_vtable
(
decl
,
type
)
import_export_vtable
(
decl
,
type
)
tree
decl
,
type
;
tree
decl
,
type
;
{
{
if
(
write_virtuals
>=
2
if
(
write_virtuals
>=
2
||
CLASSTYPE_TEMPLATE_INSTANTIATION
(
type
))
||
CLASSTYPE_TEMPLATE_INSTANTIATION
(
type
))
{
{
if
(
CLASSTYPE_IMPLICIT_INSTANTIATION
(
type
)
&&
!
flag_implicit_templates
&&
CLASSTYPE_INTERFACE_UNKNOWN
(
type
))
{
SET_CLASSTYPE_INTERFACE_KNOWN
(
type
);
CLASSTYPE_INTERFACE_ONLY
(
type
)
=
1
;
CLASSTYPE_VTABLE_NEEDS_WRITING
(
type
)
=
0
;
}
if
(
CLASSTYPE_INTERFACE_KNOWN
(
type
))
if
(
CLASSTYPE_INTERFACE_KNOWN
(
type
))
{
{
TREE_PUBLIC
(
decl
)
=
1
;
TREE_PUBLIC
(
decl
)
=
1
;
...
@@ -2366,10 +2357,25 @@ import_export_vtable (decl, type)
...
@@ -2366,10 +2357,25 @@ import_export_vtable (decl, type)
}
}
static
void
static
void
import_export_template
(
type
)
tree
type
;
{
if
(
CLASSTYPE_IMPLICIT_INSTANTIATION
(
type
)
&&
!
flag_implicit_templates
&&
CLASSTYPE_INTERFACE_UNKNOWN
(
type
))
{
SET_CLASSTYPE_INTERFACE_KNOWN
(
type
);
CLASSTYPE_INTERFACE_ONLY
(
type
)
=
1
;
CLASSTYPE_VTABLE_NEEDS_WRITING
(
type
)
=
0
;
}
}
static
void
finish_vtable_vardecl
(
prev
,
vars
)
finish_vtable_vardecl
(
prev
,
vars
)
tree
prev
,
vars
;
tree
prev
,
vars
;
{
{
tree
ctype
=
DECL_CONTEXT
(
vars
);
tree
ctype
=
DECL_CONTEXT
(
vars
);
import_export_template
(
ctype
);
import_export_vtable
(
vars
,
ctype
);
import_export_vtable
(
vars
,
ctype
);
if
(
flag_vtable_thunks
&&
!
CLASSTYPE_INTERFACE_KNOWN
(
ctype
))
if
(
flag_vtable_thunks
&&
!
CLASSTYPE_INTERFACE_KNOWN
(
ctype
))
...
@@ -2798,7 +2804,8 @@ finish_file ()
...
@@ -2798,7 +2804,8 @@ finish_file ()
#endif
#endif
walk_vtables
((
void
(
*
)())
0
,
finish_vtable_vardecl
);
walk_vtables
((
void
(
*
)())
0
,
finish_vtable_vardecl
);
walk_sigtables
((
void
(
*
)())
0
,
finish_sigtable_vardecl
);
if
(
flag_handle_signatures
)
walk_sigtables
((
void
(
*
)())
0
,
finish_sigtable_vardecl
);
for
(
vars
=
getdecls
();
vars
;
vars
=
TREE_CHAIN
(
vars
))
for
(
vars
=
getdecls
();
vars
;
vars
=
TREE_CHAIN
(
vars
))
{
{
...
...
gcc/cp/method.c
View file @
5b605f68
...
@@ -1460,12 +1460,12 @@ hack_identifier (value, name, yychar)
...
@@ -1460,12 +1460,12 @@ hack_identifier (value, name, yychar)
if
(
TREE_CODE
(
value
)
==
TREE_LIST
)
if
(
TREE_CODE
(
value
)
==
TREE_LIST
)
{
{
tree
t
=
value
;
tree
t
=
get_first_fn
(
value
)
;
while
(
t
&&
TREE_CODE
(
t
)
==
TREE_LIST
)
while
(
t
)
{
{
assemble_external
(
TREE_VALUE
(
t
)
);
assemble_external
(
t
);
TREE_USED
(
t
)
=
1
;
TREE_USED
(
t
)
=
1
;
t
=
TREE
_CHAIN
(
t
);
t
=
DECL
_CHAIN
(
t
);
}
}
}
}
else
else
...
...
gcc/cp/tree.c
View file @
5b605f68
...
@@ -1289,8 +1289,10 @@ count_functions (t)
...
@@ -1289,8 +1289,10 @@ count_functions (t)
{
{
if
(
TREE_CODE
(
t
)
==
FUNCTION_DECL
)
if
(
TREE_CODE
(
t
)
==
FUNCTION_DECL
)
return
1
;
return
1
;
else
if
(
TREE_CODE
(
t
)
==
TREE_LIST
)
return
decl_list_length
(
TREE_VALUE
(
t
));
return
decl_list_length
(
TREE_VALUE
(
t
)
);
my_friendly_abort
(
359
);
}
}
/* Like value_member, but for DECL_CHAINs. */
/* Like value_member, but for DECL_CHAINs. */
...
...
gcc/cp/typeck.c
View file @
5b605f68
...
@@ -2076,16 +2076,16 @@ build_x_function_call (function, params, decl)
...
@@ -2076,16 +2076,16 @@ build_x_function_call (function, params, decl)
}
}
else
else
{
{
tree
id
=
TREE_PURPOSE
(
function
);
tree
val
=
TREE_VALUE
(
function
);
function
=
TREE_VALUE
(
function
);
if
(
TREE_CODE
(
function
)
==
TEMPLATE_DECL
)
if
(
TREE_CODE
(
val
)
==
TEMPLATE_DECL
)
return
build_overload_call_maybe
return
build_overload_call_maybe
(
id
,
params
,
LOOKUP_COMPLAIN
,
(
struct
candidate
*
)
0
);
(
function
,
params
,
LOOKUP_COMPLAIN
,
(
struct
candidate
*
)
0
);
else
if
(
DECL_CHAIN
(
function
)
!=
NULL_TREE
)
else
if
(
DECL_CHAIN
(
val
)
!=
NULL_TREE
)
return
build_overload_call
return
build_overload_call
(
id
,
params
,
LOOKUP_COMPLAIN
,
(
struct
candidate
*
)
0
);
(
function
,
params
,
LOOKUP_COMPLAIN
,
(
struct
candidate
*
)
0
);
/* else fall out */
else
my_friendly_abort
(
360
);
}
}
}
}
...
@@ -2893,15 +2893,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
...
@@ -2893,15 +2893,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
&&
(
code1
==
INTEGER_TYPE
||
code1
==
REAL_TYPE
))
&&
(
code1
==
INTEGER_TYPE
||
code1
==
REAL_TYPE
))
{
{
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
&&
integer_zerop
(
op1
))
if
(
TREE_CODE
(
op1
)
==
INTEGER_CST
&&
integer_zerop
(
op1
))
{
cp_warning
(
"division by zero in `%E / 0'"
,
op0
);
error
(
"division by zero"
);
op1
=
integer_one_node
;
}
else
if
(
TREE_CODE
(
op1
)
==
REAL_CST
&&
real_zerop
(
op1
))
else
if
(
TREE_CODE
(
op1
)
==
REAL_CST
&&
real_zerop
(
op1
))
{
cp_warning
(
"division by zero in `%E / 0.'"
,
op0
);
error
(
"division by zero"
);
op1
=
build_real
(
TREE_TYPE
(
op1
),
dconst1
);
}
if
(
!
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
))
if
(
!
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
))
resultcode
=
RDIV_EXPR
;
resultcode
=
RDIV_EXPR
;
...
@@ -2954,15 +2948,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
...
@@ -2954,15 +2948,9 @@ build_binary_op_nodefault (code, orig_op0, orig_op1, error_code)
case
TRUNC_MOD_EXPR
:
case
TRUNC_MOD_EXPR
:
case
FLOOR_MOD_EXPR
:
case
FLOOR_MOD_EXPR
:
if
(
code1
==
INTEGER_TYPE
&&
integer_zerop
(
op1
))
if
(
code1
==
INTEGER_TYPE
&&
integer_zerop
(
op1
))
{
cp_warning
(
"division by zero in `%E % 0'"
,
op0
);
error
(
"division by zero"
);
op1
=
integer_one_node
;
}
else
if
(
code1
==
REAL_TYPE
&&
real_zerop
(
op1
))
else
if
(
code1
==
REAL_TYPE
&&
real_zerop
(
op1
))
{
cp_warning
(
"division by zero in `%E % 0.'"
,
op0
);
error
(
"division by zero"
);
op1
=
build_real
(
TREE_TYPE
(
op1
),
dconst1
);
}
if
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
)
if
(
code0
==
INTEGER_TYPE
&&
code1
==
INTEGER_TYPE
)
{
{
...
...
gcc/cp/typeck2.c
View file @
5b605f68
...
@@ -329,7 +329,7 @@ ack (s, v, v2)
...
@@ -329,7 +329,7 @@ ack (s, v, v2)
silly. So instead, we just do the equivalent of a call to fatal in the
silly. So instead, we just do the equivalent of a call to fatal in the
same situation (call exit). */
same situation (call exit). */
/* First used: 0 (reserved), Last used: 3
58
. Free: */
/* First used: 0 (reserved), Last used: 3
60
. Free: */
static
int
abortcount
=
0
;
static
int
abortcount
=
0
;
...
...
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