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
01f4137f
Commit
01f4137f
authored
Oct 07, 2002
by
Richard Henderson
Committed by
Richard Henderson
Oct 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* decl2.c, pt.c: Revert c++/7754 fix.
From-SVN: r57895
parent
e0fbf849
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
43 deletions
+36
-43
gcc/cp/ChangeLog
+4
-0
gcc/cp/decl2.c
+17
-22
gcc/cp/pt.c
+15
-21
No files found.
gcc/cp/ChangeLog
View file @
01f4137f
2002-10-07 Richard Henderson <rth@redhat.com>
* decl2.c, pt.c: Revert c++/7754 fix.
2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/7804
...
...
gcc/cp/decl2.c
View file @
01f4137f
...
...
@@ -1382,31 +1382,26 @@ finish_anon_union (anon_union_decl)
return
;
}
if
(
!
processing_template_decl
)
{
main_decl
=
build_anon_union_vars
(
anon_union_decl
,
&
DECL_ANON_UNION_ELEMS
(
anon_union_decl
),
static_p
,
external_p
);
if
(
main_decl
==
NULL_TREE
)
{
warning
(
"anonymous aggregate with no members"
);
return
;
}
main_decl
=
build_anon_union_vars
(
anon_union_decl
,
&
DECL_ANON_UNION_ELEMS
(
anon_union_decl
),
static_p
,
external_p
);
if
(
static_p
)
{
make_decl_rtl
(
main_decl
,
0
);
COPY_DECL_RTL
(
main_decl
,
anon_union_decl
);
expand_anon_union_decl
(
anon_union_decl
,
NULL_TREE
,
DECL_ANON_UNION_ELEMS
(
anon_union_decl
));
return
;
}
if
(
main_decl
==
NULL_TREE
)
{
warning
(
"anonymous aggregate with no members"
);
return
;
}
add_decl_stmt
(
anon_union_decl
);
if
(
static_p
)
{
make_decl_rtl
(
main_decl
,
0
);
COPY_DECL_RTL
(
main_decl
,
anon_union_decl
);
expand_anon_union_decl
(
anon_union_decl
,
NULL_TREE
,
DECL_ANON_UNION_ELEMS
(
anon_union_decl
));
}
else
add_decl_stmt
(
anon_union_decl
);
}
/* Finish processing a builtin type TYPE. It's name is NAME,
...
...
gcc/cp/pt.c
View file @
01f4137f
...
...
@@ -6134,7 +6134,7 @@ tsubst_decl (t, args, type, complain)
}
r
=
copy_decl
(
t
);
TREE_TYPE
(
r
)
=
complete_type
(
type
)
;
TREE_TYPE
(
r
)
=
type
;
c_apply_type_quals_to_decl
(
cp_type_quals
(
type
),
r
);
DECL_CONTEXT
(
r
)
=
ctx
;
/* Clear out the mangled name and RTL for the instantiation. */
...
...
@@ -6173,8 +6173,6 @@ tsubst_decl (t, args, type, complain)
TREE_CHAIN
(
r
)
=
NULL_TREE
;
if
(
TREE_CODE
(
r
)
==
VAR_DECL
&&
VOID_TYPE_P
(
type
))
cp_error_at
(
"instantiation of `%D' as type `%T'"
,
r
,
type
);
/* Compute the size, alignment, etc. of R. */
layout_decl
(
r
,
0
);
}
break
;
...
...
@@ -7426,6 +7424,9 @@ tsubst_expr (t, args, complain, in_decl)
decl
=
tsubst
(
decl
,
args
,
complain
,
in_decl
);
if
(
decl
!=
error_mark_node
)
{
if
(
TREE_CODE
(
decl
)
!=
TYPE_DECL
)
/* Make sure the type is instantiated now. */
complete_type
(
TREE_TYPE
(
decl
));
if
(
init
)
DECL_INITIAL
(
decl
)
=
error_mark_node
;
/* By marking the declaration as instantiated, we avoid
...
...
@@ -7435,26 +7436,19 @@ tsubst_expr (t, args, complain, in_decl)
do. */
if
(
TREE_CODE
(
decl
)
==
VAR_DECL
)
DECL_TEMPLATE_INSTANTIATED
(
decl
)
=
1
;
if
(
TREE_CODE
(
decl
)
==
VAR_DECL
&&
ANON_AGGR_TYPE_P
(
TREE_TYPE
(
decl
)))
/* Anonymous aggregates are a special case. */
finish_anon_union
(
decl
);
else
maybe_push_decl
(
decl
);
if
(
DECL_PRETTY_FUNCTION_P
(
decl
))
{
maybe_push_decl
(
decl
);
if
(
DECL_PRETTY_FUNCTION_P
(
decl
))
{
/* For __PRETTY_FUNCTION__ we have to adjust the
initializer. */
const
char
*
const
name
=
cxx_printable_name
(
current_function_decl
,
2
);
init
=
cp_fname_init
(
name
);
TREE_TYPE
(
decl
)
=
TREE_TYPE
(
init
);
}
else
init
=
tsubst_expr
(
init
,
args
,
complain
,
in_decl
);
cp_finish_decl
(
decl
,
init
,
NULL_TREE
,
0
);
/* For __PRETTY_FUNCTION__ we have to adjust the
initializer. */
const
char
*
const
name
=
cxx_printable_name
(
current_function_decl
,
2
);
init
=
cp_fname_init
(
name
);
TREE_TYPE
(
decl
)
=
TREE_TYPE
(
init
);
}
else
init
=
tsubst_expr
(
init
,
args
,
complain
,
in_decl
);
cp_finish_decl
(
decl
,
init
,
NULL_TREE
,
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