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
d60ab851
Commit
d60ab851
authored
Jun 10, 1998
by
Jason Merrill
Committed by
Jason Merrill
Jun 10, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* typeck.c (build_component_ref): Diagnose ref to nested type.
From-SVN: r20419
parent
3e2b9a3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
gcc/cp/ChangeLog
+4
-0
gcc/cp/typeck.c
+6
-7
No files found.
gcc/cp/ChangeLog
View file @
d60ab851
1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
* typeck.c (build_component_ref): Diagnose ref to nested type.
1998-06-10 Brendan Kehoe <brendan@cygnus.com>
* decl.c (grokparms): Check that INIT isn't an error_mark_node
...
...
gcc/cp/typeck.c
View file @
d60ab851
...
...
@@ -1959,10 +1959,12 @@ build_component_ref (datum, component, basetype_path, protect)
hierarchy, the compiler will abort (because vptr lookups are
not supposed to be ambiguous. */
field
=
CLASSTYPE_VFIELD
(
basetype
);
else
if
(
TREE_CODE
(
component
)
==
FIELD_DECL
||
TREE_CODE
(
component
)
==
TYPE_DECL
)
else
if
(
TREE_CODE
(
component
)
==
FIELD_DECL
)
field
=
component
;
else
if
(
TREE_CODE
(
component
)
==
TYPE_DECL
)
{
field
=
component
;
cp_pedwarn
(
"invalid use of type decl `%#D' as expression"
,
component
);
return
component
;
}
else
{
...
...
@@ -2049,10 +2051,7 @@ build_component_ref (datum, component, basetype_path, protect)
if
(
TREE_CODE
(
field
)
!=
FIELD_DECL
)
{
if
(
TREE_CODE
(
field
)
==
TYPE_DECL
)
{
cp_error
(
"invalid use of type decl `%#D' as expression"
,
field
);
return
error_mark_node
;
}
cp_pedwarn
(
"invalid use of type decl `%#D' as expression"
,
field
);
else
if
(
DECL_RTL
(
field
)
!=
0
)
mark_used
(
field
);
else
...
...
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