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
f1a3f197
Commit
f1a3f197
authored
Feb 16, 2001
by
Mark Mitchell
Committed by
Mark Mitchell
Feb 16, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* typeck2.c (build_m_component_ref): Robustify.
From-SVN: r39731
parent
e2c09482
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
gcc/cp/ChangeLog
+4
-0
gcc/cp/typeck2.c
+8
-7
gcc/testsuite/g++.old-deja/g++.other/ptrmem6.C
+3
-3
No files found.
gcc/cp/ChangeLog
View file @
f1a3f197
2001-02-15 Mark Mitchell <mark@codesourcery.com>
* typeck2.c (build_m_component_ref): Robustify.
2001-02-15 Alexandre Oliva <aoliva@redhat.com>
* friend.c (do_friend): Don't take the nested [template] class
...
...
gcc/cp/typeck2.c
View file @
f1a3f197
...
...
@@ -1093,6 +1093,10 @@ build_m_component_ref (datum, component)
return
build_min_nt
(
DOTSTAR_EXPR
,
datum
,
component
);
datum
=
decay_conversion
(
datum
);
if
(
datum
==
error_mark_node
||
component
==
error_mark_node
)
return
error_mark_node
;
objtype
=
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
datum
));
if
(
TYPE_PTRMEMFUNC_P
(
TREE_TYPE
(
component
)))
...
...
@@ -1100,18 +1104,15 @@ build_m_component_ref (datum, component)
type
=
TREE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
TREE_TYPE
(
component
)));
field_type
=
type
;
}
else
else
if
(
TYPE_PTRMEM_P
(
TREE_TYPE
(
component
)))
{
type
=
TREE_TYPE
(
TREE_TYPE
(
component
));
field_type
=
TREE_TYPE
(
type
);
}
if
(
datum
==
error_mark_node
||
component
==
error_mark_node
)
return
error_mark_node
;
if
(
TREE_CODE
(
type
)
!=
OFFSET_TYPE
&&
TREE_CODE
(
type
)
!=
METHOD_TYPE
)
else
{
cp_error
(
"`%E' cannot be used as a member pointer, since it is of type `%T'"
,
component
,
type
);
cp_error
(
"`%E' cannot be used as a member pointer, since it is of type `%T'"
,
component
,
TREE_TYPE
(
component
));
return
error_mark_node
;
}
...
...
gcc/testsuite/g++.old-deja/g++.other/ptrmem6.C
View file @
f1a3f197
// Build don't link:
// crash test
- XFAIL *-*-*
// crash test
// Copyright (c) 2000 Free Software Foundation.
// Copyright (c) 2000
, 2001
Free Software Foundation.
// Distilled from a bug report by Eric Ford <eford@princeton.edu>
extern
double
*
y
;
...
...
@@ -12,5 +12,5 @@ void SetInitCond(void)
{
int
i
;
for
(
i
=
2
;
i
<
nPoints
;
++
i
)
y
[
i
]
=
y
[
nPoints
]
.
*
(
x
[
i
]
-
x
[
1
])
/
(
x
[
nPoints
]
-
x
[
1
]);
// ERROR
y
[
i
]
=
y
[
nPoints
]
.
*
(
x
[
i
]
-
x
[
1
])
/
(
x
[
nPoints
]
-
x
[
1
]);
// ERROR
- .*
}
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