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
79ff2c6c
Commit
79ff2c6c
authored
Apr 09, 1995
by
Mike Stump
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
64th Cygnus<->FSF merge
From-SVN: r9341
parent
aba892c4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
145 additions
and
37 deletions
+145
-37
gcc/cp/ChangeLog
+50
-0
gcc/cp/Makefile.in
+1
-1
gcc/cp/decl.c
+8
-0
gcc/cp/decl2.c
+7
-0
gcc/cp/lex.c
+8
-1
gcc/cp/repo.c
+67
-35
gcc/cp/typeck.c
+4
-0
No files found.
gcc/cp/ChangeLog
View file @
79ff2c6c
Sat Apr 8 17:45:41 1995 Mike Stump <mrs@cygnus.com>
* gc.c (build_headof): Use ptrdiff_type_node instead of
integer_type_node on pointer arithmetic.
Sat Apr 8 11:57:04 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* typeck.c (build_modify_expr): Undo previous change.
Thu Apr 6 01:23:50 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* Makefile.in (compiler): Remove ../cc1plus before rebuilding it.
* repo.c (get_base_filename): Put the .rpo file in the directory
with the object file, not the source.
* typeck.c (build_conditional_expr): Handle pmf's better.
* repo.c (finish_repo): Also use ASM_OUTPUT_LABELREF to print out
the name of the symbol.
Wed Apr 5 15:24:12 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* repo.c (open_repo_file): Make repo filename DOS-compliant.
(*): Also write a new repo file if some previously-used
templates are no longer used. Only remember the identifier.
* lex.c (cons_up_default_function): If this function belongs to a
template class, call repo_template_used for it.
* repo.c (repo_template_used): Using a class means using its vtable,
if any.
(finish_repo): Ditto.
* typeck.c (build_modify_expr): Only wrap TARGET_EXPRs in RTL_EXPRs
if the type has a complex copy constructor.
* decl2.c (lang_decode_option): -frepo implies
-fno-implicit-templates.
* decl.c (start_function): Clear current_{base,member}_init_list.
* lex.c (init_lex): Also unset *_eq if ! flag_operator_names.
Tue Apr 4 16:11:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* decl.c (struct cp_function): Add {base,member}_init_list.
(push_cp_function_context): Save current_{base,member}_init_list.
(pop_cp_function_context): Restore them.
Mon Apr 3 16:55:08 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* repo.c (get_base_filename): Take filename parm, fix logic bug.
...
...
gcc/cp/Makefile.in
View file @
79ff2c6c
...
...
@@ -167,7 +167,7 @@ OBJDEPS = ../stamp-objlist ../c-common.o ../c-pragma.o
compiler
:
../cc1plus
../cc1plus
:
$(P) $(CXX_OBJS) $(OBJDEPS) $(LIBDEPS)
rm
-f
$@
rm
-f
../cc1plus
$(CC)
$(ALL_CFLAGS)
$(LDFLAGS)
-o
../cc1plus
\
$(CXX_OBJS)
$(OBJS)
$(LIBS)
...
...
gcc/cp/decl.c
View file @
79ff2c6c
...
...
@@ -10653,6 +10653,8 @@ start_function (declspecs, declarator, raises, pre_parsed_p)
current_function_obstack_usage
=
0
;
base_init_insns
=
NULL_RTX
;
protect_list
=
NULL_TREE
;
current_base_init_list
=
NULL_TREE
;
current_member_init_list
=
NULL_TREE
;
clear_temp_name
();
...
...
@@ -12137,6 +12139,8 @@ struct cp_function
tree
ctor_label
;
tree
dtor_label
;
tree
protect_list
;
tree
base_init_list
;
tree
member_init_list
;
rtx
result_rtx
;
rtx
base_init_insns
;
struct
cp_function
*
next
;
...
...
@@ -12177,6 +12181,8 @@ push_cp_function_context (context)
p
->
base_init_insns
=
base_init_insns
;
p
->
protect_list
=
protect_list
;
p
->
temp_name_counter
=
temp_name_counter
;
p
->
base_init_list
=
current_base_init_list
;
p
->
member_init_list
=
current_member_init_list
;
}
/* Restore the variables used during compilation of a C++ function. */
...
...
@@ -12224,6 +12230,8 @@ pop_cp_function_context (context)
original_result_rtx
=
p
->
result_rtx
;
base_init_insns
=
p
->
base_init_insns
;
temp_name_counter
=
p
->
temp_name_counter
;
current_base_init_list
=
p
->
base_init_list
;
current_member_init_list
=
p
->
member_init_list
;
free
(
p
);
}
gcc/cp/decl2.c
View file @
79ff2c6c
...
...
@@ -494,6 +494,13 @@ lang_decode_option (p)
else
if
(
!
strcmp
(
p
,
"ansi-overloading"
))
{
warning
(
"-fansi-overloading is no longer meaningful"
);
found
=
1
;
}
else
if
(
!
strcmp
(
p
,
"repo"
))
{
flag_use_repository
=
1
;
flag_implicit_templates
=
0
;
found
=
1
;
}
else
for
(
j
=
0
;
!
found
&&
j
<
sizeof
(
lang_f_options
)
/
sizeof
(
lang_f_options
[
0
]);
...
...
gcc/cp/lex.c
View file @
79ff2c6c
...
...
@@ -809,12 +809,16 @@ init_lex ()
{
/* These are new ANSI keywords that may break code. */
UNSET_RESERVED_WORD
(
"and"
);
UNSET_RESERVED_WORD
(
"and_eq"
);
UNSET_RESERVED_WORD
(
"bitand"
);
UNSET_RESERVED_WORD
(
"bitor"
);
UNSET_RESERVED_WORD
(
"compl"
);
UNSET_RESERVED_WORD
(
"not"
);
UNSET_RESERVED_WORD
(
"not_eq"
);
UNSET_RESERVED_WORD
(
"or"
);
UNSET_RESERVED_WORD
(
"or_eq"
);
UNSET_RESERVED_WORD
(
"xor"
);
UNSET_RESERVED_WORD
(
"xor_eq"
);
}
if
(
!
flag_traditional
)
UNSET_RESERVED_WORD
(
"overload"
);
...
...
@@ -1784,7 +1788,10 @@ cons_up_default_function (type, full_name, kind)
return
fn
;
if
(
processing_template_defn
)
SET_DECL_IMPLICIT_INSTANTIATION
(
fn
);
{
SET_DECL_IMPLICIT_INSTANTIATION
(
fn
);
repo_template_used
(
fn
);
}
if
(
CLASSTYPE_INTERFACE_KNOWN
(
type
))
{
...
...
gcc/cp/repo.c
View file @
79ff2c6c
...
...
@@ -29,19 +29,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "tree.h"
#include "cp-tree.h"
#include "input.h"
#include "obstack.h"
extern
char
*
rindex
();
extern
char
*
getenv
();
static
tree
pending_repo
;
static
tree
original_repo
;
static
char
repo_name
[
1024
];
static
FILE
*
repo_file
;
extern
int
flag_use_repository
;
extern
int
errorcount
,
sorrycount
;
static
int
repo_changed
;
#define IDENTIFIER_REPO_USED(NODE) (TREE_LANG_FLAG_3 (NODE))
#define IDENTIFIER_REPO_CHOSEN(NODE) (TREE_LANG_FLAG_4 (NODE))
...
...
@@ -93,7 +93,10 @@ repo_template_used (t)
if
(
TREE_CODE_CLASS
(
TREE_CODE
(
t
))
==
't'
)
{
id
=
DECL_ASSEMBLER_NAME
(
TYPE_MAIN_DECL
(
t
));
id
=
TYPE_BINFO_VTABLE
(
t
);
if
(
id
==
NULL_TREE
)
return
;
id
=
DECL_ASSEMBLER_NAME
(
id
);
if
(
IDENTIFIER_REPO_CHOSEN
(
id
))
mark_class_instantiated
(
t
,
0
);
}
...
...
@@ -108,10 +111,9 @@ repo_template_used (t)
if
(
!
IDENTIFIER_REPO_USED
(
id
))
{
repo_changed
=
1
;
IDENTIFIER_REPO_USED
(
id
)
=
1
;
pending_repo
=
perm_tree_cons
(
NULL_TREE
,
id
,
pending_repo
);
}
pending_repo
=
perm_tree_cons
(
NULL_TREE
,
t
,
pending_repo
);
}
/* Note that the vtable for a class has been used, and offer to emit it. */
...
...
@@ -160,11 +162,8 @@ save_string (s, len)
char
*
s
;
int
len
;
{
register
char
*
result
=
xmalloc
(
len
+
1
);
bcopy
(
s
,
result
,
len
);
result
[
len
]
=
0
;
return
result
;
extern
struct
obstack
temporary_obstack
;
return
obstack_copy0
(
&
temporary_obstack
,
s
,
len
);
}
static
char
*
...
...
@@ -201,7 +200,18 @@ get_base_filename (filename)
if
(
compiling
&&
output
)
return
output
;
return
save_string
(
filename
,
strlen
(
filename
));
if
(
p
&&
!
compiling
)
{
warning
(
"-frepo must be used with -c"
);
flag_use_repository
=
0
;
return
NULL
;
}
p
=
rindex
(
filename
,
'/'
);
if
(
p
)
return
p
+
1
;
else
return
filename
;
}
static
void
...
...
@@ -210,7 +220,12 @@ open_repo_file (filename)
{
register
char
*
p
,
*
q
;
char
*
file
=
get_base_filename
(
filename
);
char
*
s
=
rindex
(
file
,
'/'
);
char
*
s
;
if
(
file
==
NULL
)
return
;
s
=
rindex
(
file
,
'/'
);
if
(
s
==
NULL
)
s
=
file
;
else
...
...
@@ -218,16 +233,15 @@ open_repo_file (filename)
for
(
p
=
repo_name
,
q
=
file
;
q
<
s
;
)
*
p
++
=
*
q
++
;
*
p
++
=
'.'
;
/* *p++ = '.'; */
if
((
s
=
rindex
(
q
,
'.'
))
==
NULL
)
strcpy
(
p
,
q
);
else
for
(;
q
<
s
;)
*
p
++
=
*
q
++
;
strcat
(
p
,
".r
e
po"
);
strcat
(
p
,
".rpo"
);
repo_file
=
fopen
(
repo_name
,
"r"
);
free
(
file
);
}
void
...
...
@@ -239,18 +253,13 @@ init_repo (filename)
if
(
!
flag_use_repository
)
return
;
open_repo_file
();
open_repo_file
(
filename
);
if
(
repo_file
==
0
)
return
;
while
(
fgets
(
buf
,
1024
,
repo_file
))
{
int
len
=
strlen
(
buf
)
-
1
;
if
(
buf
[
len
]
!=
'\n'
)
error
(
"repository info line too long in %s"
,
repo_name
);
buf
[
len
]
=
'\0'
;
switch
(
buf
[
0
])
{
case
'A'
:
...
...
@@ -260,10 +269,16 @@ init_repo (filename)
case
'C'
:
case
'O'
:
{
tree
id
=
get_identifier
(
&
buf
[
2
]);
IDENTIFIER_REPO_USED
(
id
)
=
1
;
char
*
q
;
tree
id
;
for
(
q
=
&
buf
[
2
];
*
q
&&
*
q
!=
' '
&&
*
q
!=
'\n'
;
++
q
)
;
q
=
save_string
(
&
buf
[
2
],
q
-
&
buf
[
2
]);
id
=
get_identifier
(
q
);
if
(
buf
[
0
]
==
'C'
)
IDENTIFIER_REPO_CHOSEN
(
id
)
=
1
;
original_repo
=
perm_tree_cons
(
NULL_TREE
,
id
,
original_repo
);
}
break
;
default
:
...
...
@@ -293,12 +308,37 @@ finish_repo ()
{
tree
t
;
char
*
p
;
int
repo_changed
=
0
;
if
(
!
flag_use_repository
)
return
;
/* Do we have to write out a new info file? */
/* Are there any old templates that aren't used any longer? */
for
(
t
=
original_repo
;
t
;
t
=
TREE_CHAIN
(
t
))
{
if
(
!
IDENTIFIER_REPO_USED
(
TREE_VALUE
(
t
)))
{
repo_changed
=
1
;
break
;
}
IDENTIFIER_REPO_USED
(
TREE_VALUE
(
t
))
=
0
;
}
/* Are there any templates that are newly used? */
if
(
!
repo_changed
)
for
(
t
=
pending_repo
;
t
;
t
=
TREE_CHAIN
(
t
))
{
if
(
IDENTIFIER_REPO_USED
(
TREE_VALUE
(
t
)))
{
repo_changed
=
1
;
break
;
}
}
if
(
!
repo_changed
||
errorcount
||
sorrycount
)
goto
out
;
...
...
@@ -320,19 +360,11 @@ finish_repo ()
for
(
t
=
pending_repo
;
t
;
t
=
TREE_CHAIN
(
t
))
{
tree
val
=
TREE_VALUE
(
t
);
char
type
;
if
(
TREE_CODE_CLASS
(
TREE_CODE
(
val
))
==
't'
)
val
=
TYPE_MAIN_DECL
(
val
);
val
=
DECL_ASSEMBLER_NAME
(
val
);
if
(
!
IDENTIFIER_REPO_USED
(
val
))
continue
;
IDENTIFIER_REPO_USED
(
val
)
=
0
;
type
=
IDENTIFIER_REPO_CHOSEN
(
val
)
?
'C'
:
'O'
;
char
type
=
IDENTIFIER_REPO_CHOSEN
(
val
)
?
'C'
:
'O'
;
fprintf
(
repo_file
,
"%c %s
\n
"
,
type
,
IDENTIFIER_POINTER
(
val
));
fprintf
(
repo_file
,
"%c %s "
,
type
,
IDENTIFIER_POINTER
(
val
));
ASM_OUTPUT_LABELREF
(
repo_file
,
IDENTIFIER_POINTER
(
val
));
putc
(
'\n'
,
repo_file
);
}
out
:
...
...
gcc/cp/typeck.c
View file @
79ff2c6c
...
...
@@ -4769,6 +4769,10 @@ build_conditional_expr (ifexp, op1, op2)
}
}
if
(
TREE_CODE
(
result_type
)
==
POINTER_TYPE
&&
TREE_CODE
(
TREE_TYPE
(
result_type
))
==
METHOD_TYPE
)
result_type
=
build_ptrmemfunc_type
(
result_type
);
if
(
result_type
!=
TREE_TYPE
(
op1
))
op1
=
convert_and_check
(
result_type
,
op1
);
if
(
result_type
!=
TREE_TYPE
(
op2
))
...
...
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