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
8dff1027
Commit
8dff1027
authored
Aug 01, 1997
by
Mike Stump
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
92th Cygnus<->FSF quick merge
From-SVN: r14576
parent
5e5b9f69
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
84 additions
and
31 deletions
+84
-31
gcc/cp/ChangeLog
+20
-0
gcc/cp/Make-lang.in
+12
-10
gcc/cp/Makefile.in
+1
-1
gcc/cp/method.c
+31
-5
gcc/cp/parse.y
+20
-13
gcc/cp/tree.c
+0
-2
No files found.
gcc/cp/ChangeLog
View file @
8dff1027
Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
* parse.y: Break out eat_saved_input, handle errors.
Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
* tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
existence of cc1plus check whether $(LANGUAGES) contains C++.
Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* method.c (do_build_copy_constructor): When copying an anonymous
union member loop around to handle nested anonymous unions. Use
the offset of the member relative to the outer structure, not the
union.
Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (resolve_args): New fn.
* call.c (resolve_args): New fn.
...
...
gcc/cp/Make-lang.in
View file @
8dff1027
...
@@ -157,21 +157,23 @@ new2.o: cc1plus $(srcdir)/cp/new2.cc
...
@@ -157,21 +157,23 @@ new2.o: cc1plus $(srcdir)/cp/new2.cc
# We want to update cplib2.txt if any of the source files change...
# We want to update cplib2.txt if any of the source files change...
cplib2.txt
:
$(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) cplib2.ready
cplib2.txt
:
$(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) cplib2.ready
if
[
-f
cc1plus
]
;
then
\
case
"
$(LANGUAGES)
"
in
\
echo
$(CXX_LIB2FUNCS)
>
cplib2.new
;
\
*
" "
[
cC]
"++ "
*
)
\
else
\
echo
$(CXX_LIB2FUNCS)
>
cplib2.new
;;
\
echo
""
>
cplib2.new
;
\
*
)
\
fi
echo
""
>
cplib2.new
;;
\
esac
mv
-f
cplib2.new cplib2.txt
mv
-f
cplib2.new cplib2.txt
# Or if it would be different.
# Or if it would be different.
cplib2.ready
:
$(GCC_PASSES) $(LANGUAGES) $(LIBGCC2_DEPS) stmp-int-hdrs
cplib2.ready
:
$(GCC_PASSES) $(LANGUAGES) $(LIBGCC2_DEPS) stmp-int-hdrs
@
if
[
-r
cplib2.txt
]
;
then
\
@
if
[
-r
cplib2.txt
]
;
then
\
if
[
-f
cc1plus
]
;
then
\
case
"
$(LANGUAGES)
"
in
\
echo
$(CXX_LIB2FUNCS)
>
cplib2.new
;
\
*
" "
[
cC]
"++ "
*
)
\
else
\
echo
$(CXX_LIB2FUNCS)
>
cplib2.new
;;
\
echo
""
>
cplib2.new
;
\
*
)
\
fi
;
\
echo
""
>
cplib2.new
;;
\
esac
;
\
if
cmp
-s
cplib2.new cplib2.txt
;
then
true
;
else
\
if
cmp
-s
cplib2.new cplib2.txt
;
then
true
;
else
\
touch cplib2.ready
;
\
touch cplib2.ready
;
\
fi
;
\
fi
;
\
...
...
gcc/cp/Makefile.in
View file @
8dff1027
...
@@ -195,7 +195,7 @@ parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h
...
@@ -195,7 +195,7 @@ parse.o : $(PARSE_C) $(CONFIG_H) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h
$(CC)
-c
$(ALL_CFLAGS)
$(ALL_CPPFLAGS)
$(INCLUDES)
$(BIG_SWITCHFLAG)
\
$(CC)
-c
$(ALL_CFLAGS)
$(ALL_CPPFLAGS)
$(INCLUDES)
$(BIG_SWITCHFLAG)
\
`
echo
$(PARSE_C)
| sed
's,^\./,,'
`
`
echo
$(PARSE_C)
| sed
's,^\./,,'
`
CONFLICTS
=
expect
18
shift
/reduce conflicts and 39 reduce/reduce conflicts.
CONFLICTS
=
expect
20
shift
/reduce conflicts and 39 reduce/reduce conflicts.
$(PARSE_H)
:
$(PARSE_C)
$(PARSE_H)
:
$(PARSE_C)
$(PARSE_C)
:
$(srcdir)/parse.y
$(PARSE_C)
:
$(srcdir)/parse.y
@
echo
$(CONFLICTS)
@
echo
$(CONFLICTS)
...
...
gcc/cp/method.c
View file @
8dff1027
...
@@ -1924,6 +1924,8 @@ do_build_copy_constructor (fndecl)
...
@@ -1924,6 +1924,8 @@ do_build_copy_constructor (fndecl)
if
(
TREE_CODE
(
field
)
!=
FIELD_DECL
)
if
(
TREE_CODE
(
field
)
!=
FIELD_DECL
)
continue
;
continue
;
init
=
parm
;
if
(
DECL_NAME
(
field
))
if
(
DECL_NAME
(
field
))
{
{
if
(
VFIELD_NAME_P
(
DECL_NAME
(
field
)))
if
(
VFIELD_NAME_P
(
DECL_NAME
(
field
)))
...
@@ -1939,11 +1941,21 @@ do_build_copy_constructor (fndecl)
...
@@ -1939,11 +1941,21 @@ do_build_copy_constructor (fndecl)
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
)
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
)
field
=
largest_union_member
(
t
);
{
do
{
init
=
build
(
COMPONENT_REF
,
t
,
init
,
field
);
field
=
largest_union_member
(
t
);
}
while
((
t
=
TREE_TYPE
(
field
))
!=
NULL_TREE
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
);
}
else
else
continue
;
continue
;
init
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
parm
,
field
);
init
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
init
,
field
);
init
=
build_tree_list
(
NULL_TREE
,
init
);
init
=
build_tree_list
(
NULL_TREE
,
init
);
current_member_init_list
current_member_init_list
...
@@ -2017,6 +2029,9 @@ do_build_assign_ref (fndecl)
...
@@ -2017,6 +2029,9 @@ do_build_assign_ref (fndecl)
continue
;
continue
;
}
}
comp
=
current_class_ref
;
init
=
parm
;
if
(
DECL_NAME
(
field
))
if
(
DECL_NAME
(
field
))
{
{
if
(
VFIELD_NAME_P
(
DECL_NAME
(
field
)))
if
(
VFIELD_NAME_P
(
DECL_NAME
(
field
)))
...
@@ -2032,12 +2047,23 @@ do_build_assign_ref (fndecl)
...
@@ -2032,12 +2047,23 @@ do_build_assign_ref (fndecl)
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
)
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
)
field
=
largest_union_member
(
t
);
{
do
{
comp
=
build
(
COMPONENT_REF
,
t
,
comp
,
field
);
init
=
build
(
COMPONENT_REF
,
t
,
init
,
field
);
field
=
largest_union_member
(
t
);
}
while
((
t
=
TREE_TYPE
(
field
))
!=
NULL_TREE
&&
TREE_CODE
(
t
)
==
UNION_TYPE
&&
ANON_AGGRNAME_P
(
TYPE_IDENTIFIER
(
t
))
&&
TYPE_FIELDS
(
t
)
!=
NULL_TREE
);
}
else
else
continue
;
continue
;
comp
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
c
urrent_class_ref
,
field
);
comp
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
c
omp
,
field
);
init
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
parm
,
field
);
init
=
build
(
COMPONENT_REF
,
TREE_TYPE
(
field
),
init
,
field
);
expand_expr_stmt
(
build_modify_expr
(
comp
,
NOP_EXPR
,
init
));
expand_expr_stmt
(
build_modify_expr
(
comp
,
NOP_EXPR
,
init
));
}
}
...
...
gcc/cp/parse.y
View file @
8dff1027
...
@@ -363,7 +363,7 @@ lang_extdef:
...
@@ -363,7 +363,7 @@ lang_extdef:
;
;
extdef:
extdef:
fndef
fndef
eat_saved_input
{ if (pending_inlines) do_pending_inlines (); }
{ if (pending_inlines) do_pending_inlines (); }
| datadef
| datadef
{ if (pending_inlines) do_pending_inlines (); }
{ if (pending_inlines) do_pending_inlines (); }
...
@@ -374,7 +374,7 @@ extdef:
...
@@ -374,7 +374,7 @@ extdef:
assemble_asm ($3); }
assemble_asm ($3); }
| extern_lang_string '{' extdefs_opt '}'
| extern_lang_string '{' extdefs_opt '}'
{ pop_lang_context (); }
{ pop_lang_context (); }
| extern_lang_string .hush_warning fndef .warning_ok
| extern_lang_string .hush_warning fndef .warning_ok
eat_saved_input
{ if (pending_inlines) do_pending_inlines ();
{ if (pending_inlines) do_pending_inlines ();
pop_lang_context (); }
pop_lang_context (); }
| extern_lang_string .hush_warning datadef .warning_ok
| extern_lang_string .hush_warning datadef .warning_ok
...
@@ -539,8 +539,9 @@ fndef:
...
@@ -539,8 +539,9 @@ fndef:
fn.def1 maybe_return_init ctor_initializer_opt compstmt_or_error
fn.def1 maybe_return_init ctor_initializer_opt compstmt_or_error
{ finish_function (lineno, (int)$3, 0); }
{ finish_function (lineno, (int)$3, 0); }
| fn.def1 maybe_return_init function_try_block
| fn.def1 maybe_return_init function_try_block
{ if ($<ttype>$) process_next_inline ($<ttype>$); }
{ }
eat_saved_input
| fn.def1 maybe_return_init error
{ }
;
;
constructor_declarator:
constructor_declarator:
...
@@ -2109,19 +2110,23 @@ fn.defpen:
...
@@ -2109,19 +2110,23 @@ fn.defpen:
NULL_TREE, 1);
NULL_TREE, 1);
reinit_parse_for_function (); }
reinit_parse_for_function (); }
pending_inlines:
pending_inline:
/* empty */
fn.defpen maybe_return_init ctor_initializer_opt compstmt_or_error
| pending_inlines fn.defpen maybe_return_init ctor_initializer_opt
compstmt_or_error
{
{
int nested = (hack_decl_function_context
int nested = (hack_decl_function_context
(current_function_decl) != NULL_TREE);
(current_function_decl) != NULL_TREE);
finish_function (lineno, (int)$
4
, nested);
finish_function (lineno, (int)$
3
, nested);
process_next_inline ($
2
);
process_next_inline ($
1
);
}
}
| pending_inlines fn.defpen maybe_return_init function_try_block
| fn.defpen maybe_return_init function_try_block
{ process_next_inline ($2); }
{ process_next_inline ($1); }
eat_saved_input
| fn.defpen maybe_return_init error
{ process_next_inline ($1); }
;
pending_inlines:
/* empty */
| pending_inlines pending_inline eat_saved_input
;
;
/* A regurgitated default argument. The value of DEFARG_MARKER will be
/* A regurgitated default argument. The value of DEFARG_MARKER will be
...
@@ -2129,6 +2134,8 @@ pending_inlines:
...
@@ -2129,6 +2134,8 @@ pending_inlines:
defarg_again:
defarg_again:
DEFARG_MARKER expr_no_commas END_OF_SAVED_INPUT
DEFARG_MARKER expr_no_commas END_OF_SAVED_INPUT
{ replace_defarg ($1, $2); }
{ replace_defarg ($1, $2); }
| DEFARG_MARKER error END_OF_SAVED_INPUT
{ replace_defarg ($1, error_mark_node); }
pending_defargs:
pending_defargs:
/* empty */ %prec EMPTY
/* empty */ %prec EMPTY
...
...
gcc/cp/tree.c
View file @
8dff1027
...
@@ -227,10 +227,8 @@ build_cplus_new (type, init)
...
@@ -227,10 +227,8 @@ build_cplus_new (type, init)
rval
=
build
(
NEW_EXPR
,
type
,
rval
=
build
(
NEW_EXPR
,
type
,
TREE_OPERAND
(
init
,
0
),
TREE_OPERAND
(
init
,
1
),
slot
);
TREE_OPERAND
(
init
,
0
),
TREE_OPERAND
(
init
,
1
),
slot
);
TREE_SIDE_EFFECTS
(
rval
)
=
1
;
TREE_SIDE_EFFECTS
(
rval
)
=
1
;
TREE_ADDRESSABLE
(
rval
)
=
1
;
rval
=
build
(
TARGET_EXPR
,
type
,
slot
,
rval
,
NULL_TREE
,
NULL_TREE
);
rval
=
build
(
TARGET_EXPR
,
type
,
slot
,
rval
,
NULL_TREE
,
NULL_TREE
);
TREE_SIDE_EFFECTS
(
rval
)
=
1
;
TREE_SIDE_EFFECTS
(
rval
)
=
1
;
TREE_ADDRESSABLE
(
rval
)
=
1
;
return
rval
;
return
rval
;
}
}
...
...
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