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
47ee8904
Commit
47ee8904
authored
Jun 06, 2001
by
Mark Mitchell
Committed by
Mark Mitchell
Jun 06, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* semantics.c (begin_class_definition): Robustify.
From-SVN: r42937
parent
1b577f5a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
7 deletions
+30
-7
gcc/cp/ChangeLog
+2
-0
gcc/cp/semantics.c
+18
-7
gcc/testsuite/g++.old-deja/g++.pt/memtemp99.C
+10
-0
No files found.
gcc/cp/ChangeLog
View file @
47ee8904
2001-06-05 Mark Mitchell <mark@codesourcery.com>
* semantics.c (begin_class_definition): Robustify.
* pt.c (instantiate_decl): Tell the repository code about the
clones, not the cloned functions.
* repo.c (repo_template_used): Explicitly instantiate the cloned
...
...
gcc/cp/semantics.c
View file @
47ee8904
...
...
@@ -1724,18 +1724,29 @@ begin_class_definition (t)
cp_error
(
"definition of `%#T' inside template parameter list"
,
t
);
return
error_mark_node
;
}
if
(
t
==
error_mark_node
||
!
IS_AGGR_TYPE
(
t
))
/* In a definition of a member class template, we will get here with
an implicit typename. */
if
(
IMPLICIT_TYPENAME_P
(
t
))
t
=
TREE_TYPE
(
t
);
/* A non-implicit typename comes from code like:
template <typename T> struct A {
template <typename U> struct A<T>::B ...
This is erroneous. */
else
if
(
TREE_CODE
(
t
)
==
TYPENAME_TYPE
)
{
cp_error
(
"invalid definition of qualified type `%T'"
,
t
);
t
=
error_mark_node
;
}
if
(
t
==
error_mark_node
||
!
IS_AGGR_TYPE
(
t
))
{
t
=
make_aggr_type
(
RECORD_TYPE
);
pushtag
(
make_anon_name
(),
t
,
0
);
}
/* In a definition of a member class template, we will get here with an
implicit typename, a TYPENAME_TYPE with a type. */
if
(
TREE_CODE
(
t
)
==
TYPENAME_TYPE
)
t
=
TREE_TYPE
(
t
);
/* If we generated a partial instantiation of this type, but now
we're seeing a real definition, we're actually looking at a
partial specialization. Consider:
...
...
gcc/testsuite/g++.old-deja/g++.pt/memtemp99.C
0 → 100644
View file @
47ee8904
// Build don't link:
// Origin: bitti@cs.tut.fi
template
<
typename
T
,
unsigned
int
N
>
class
Vector
{
public
:
template
<
unsigned
int
I
>
class
Vector
<
T
,
N
>::
CommaInit
{
};
// ERROR - invalid definition
};
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