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
8e69329a
Commit
8e69329a
authored
Sep 01, 1997
by
Jason Merrill
Committed by
Jason Merrill
Sep 01, 1997
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* call.c (null_ptr_cst_p): Remove support for (void*)0.
From-SVN: r15022
parent
f3e0ca6c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
10 deletions
+53
-10
gcc/cp/ChangeLog
+4
-0
gcc/cp/NEWS
+9
-2
gcc/cp/call.c
+40
-8
No files found.
gcc/cp/ChangeLog
View file @
8e69329a
Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (null_ptr_cst_p): Remove support for (void*)0.
Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
* typeck.c (expand_target_expr): Make definition match declaration.
...
...
gcc/cp/NEWS
View file @
8e69329a
...
...
@@ -7,7 +7,9 @@
for more information.
* New flags -Wsign-promo, -Wno-pmf-conversion.
* New flags -Wsign-promo (warn about potentially confusing promotions in
overload resolution), -Wno-pmf-conversion (don't warn about converting
from a bound member function pointer to function pointer).
* local static variables in extern inline functions will be shared between
translation units.
...
...
@@ -65,7 +67,7 @@
already has virtual functions, only if they override a virtual destructor
in a base class. The compiler will warn if this affects your code.
* The g++ driver no
longer links with libg++ by default; it is now
* The g++ driver no
w only links against libstdc++, not libg++; it is
functionally identical to the c++ driver.
* (void *)0 is no longer considered a null pointer constant; NULL in
...
...
@@ -102,6 +104,11 @@
+ Syntax errors in templates that are never instantiated will now be
diagnosed.
Still not supported:
+ Member templates.
+ Template template parameters.
* Synthesized methods are now emitted in any translation units that need
an out-of-line copy. They are no longer affected by #pragma interface
or #pragma implementation.
...
...
gcc/cp/call.c
View file @
8e69329a
...
...
@@ -2998,9 +2998,6 @@ null_ptr_cst_p (t)
if
(
t
==
null_node
||
integer_zerop
(
t
)
&&
INTEGRAL_TYPE_P
(
TREE_TYPE
(
t
)))
return
1
;
/* Remove this eventually. */
if
(
!
pedantic
&&
TREE_TYPE
(
t
)
==
ptr_type_node
&&
integer_zerop
(
t
))
return
1
;
return
0
;
}
...
...
@@ -3697,7 +3694,7 @@ add_builtin_candidate (candidates, code, code2, fnname, type1, type2,
{
tree
c1
=
TREE_TYPE
(
type1
);
tree
c2
=
(
TYPE_PTRMEMFUNC_P
(
type2
)
?
TYPE_METHOD_BASETYPE
(
T
YPE_PTRMEMFUNC_FN_TYPE
(
type2
))
?
TYPE_METHOD_BASETYPE
(
T
REE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
type2
)
))
:
TYPE_OFFSET_BASETYPE
(
TREE_TYPE
(
type2
)));
if
(
IS_AGGR_TYPE
(
c1
)
&&
DERIVED_FROM_P
(
c2
,
c1
)
...
...
@@ -5658,8 +5655,8 @@ compare_ics (ics1, ics2)
if
(
TYPE_PTRMEMFUNC_P
(
to1
))
{
to1
=
TYPE_METHOD_BASETYPE
(
T
YPE_PTRMEMFUNC_FN_TYPE
(
to1
));
from1
=
TYPE_METHOD_BASETYPE
(
T
YPE_PTRMEMFUNC_FN_TYPE
(
from1
));
to1
=
TYPE_METHOD_BASETYPE
(
T
REE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
to1
)
));
from1
=
TYPE_METHOD_BASETYPE
(
T
REE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
from1
)
));
}
else
if
(
TREE_CODE
(
main1
)
!=
BASE_CONV
)
{
...
...
@@ -5676,8 +5673,8 @@ compare_ics (ics1, ics2)
if
(
TYPE_PTRMEMFUNC_P
(
to2
))
{
to2
=
TYPE_METHOD_BASETYPE
(
T
YPE_PTRMEMFUNC_FN_TYPE
(
to2
));
from2
=
TYPE_METHOD_BASETYPE
(
T
YPE_PTRMEMFUNC_FN_TYPE
(
from2
));
to2
=
TYPE_METHOD_BASETYPE
(
T
REE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
to2
)
));
from2
=
TYPE_METHOD_BASETYPE
(
T
REE_TYPE
(
TYPE_PTRMEMFUNC_FN_TYPE
(
from2
)
));
}
else
if
(
TREE_CODE
(
main1
)
!=
BASE_CONV
)
{
...
...
@@ -5778,6 +5775,20 @@ compare_ics (ics1, ics2)
return
0
;
}
static
tree
source_type
(
t
)
tree
t
;
{
for
(;;
t
=
TREE_OPERAND
(
t
,
0
))
{
if
(
TREE_CODE
(
t
)
==
USER_CONV
||
TREE_CODE
(
t
)
==
AMBIG_CONV
||
TREE_CODE
(
t
)
==
IDENTITY_CONV
)
return
TREE_TYPE
(
t
);
}
my_friendly_abort
(
1823
);
}
/* Compare two candidates for overloading as described in
[over.match.best]. Return values:
...
...
@@ -5868,6 +5879,27 @@ joust (cand1, cand2)
}
}
/* warn about confusing overload resolution */
if
(
winner
&&
cand1
->
second_conv
&&
!
DECL_CONSTRUCTOR_P
(
cand1
->
fn
)
&&
!
DECL_CONSTRUCTOR_P
(
cand2
->
fn
))
{
int
comp
=
compare_ics
(
cand1
->
second_conv
,
cand2
->
second_conv
);
if
(
comp
&&
comp
!=
winner
)
{
struct
z_candidate
*
w
,
*
l
;
if
(
winner
==
1
)
w
=
cand1
,
l
=
cand2
;
else
w
=
cand2
,
l
=
cand1
;
cp_warning
(
"choosing `%D' over `%D'"
,
w
->
fn
,
l
->
fn
);
cp_warning
(
" for conversion from `%T' to `%T'"
,
TREE_TYPE
(
source_type
(
TREE_VEC_ELT
(
w
->
convs
,
0
))),
TREE_TYPE
(
w
->
second_conv
));
cp_warning
(
" because conversion sequence for `this' argument is better"
);
}
}
if
(
winner
)
return
winner
;
...
...
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