typeck.c (build_static_cast): Don't strip target qualifiers when casting from a class.
* typeck.c (build_static_cast): Don't strip target qualifiers when casting from a class. From-SVN: r31236
This commit is contained in:
parent
5ed75fe4f4
commit
c0d2229e90
|
@ -1,3 +1,8 @@
|
||||||
|
2000-01-05 Nathan Sidwell <nathan@acm.org>
|
||||||
|
|
||||||
|
* typeck.c (build_static_cast): Don't strip target qualifiers
|
||||||
|
when casting from a class.
|
||||||
|
|
||||||
2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* class.c (warn_hidden): Initialize variable `fndecl'.
|
* class.c (warn_hidden): Initialize variable `fndecl'.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Build expressions with type checking for C++ compiler.
|
/* Build expressions with type checking for C++ compiler.
|
||||||
Copyright (C) 1987, 88, 89, 92-98, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1987, 88, 89, 92-99, 2000 Free Software Foundation, Inc.
|
||||||
Hacked by Michael Tiemann (tiemann@cygnus.com)
|
Hacked by Michael Tiemann (tiemann@cygnus.com)
|
||||||
|
|
||||||
This file is part of GNU CC.
|
This file is part of GNU CC.
|
||||||
|
@ -5183,8 +5183,10 @@ build_static_cast (type, expr)
|
||||||
/* FIXME handle casting to array type. */
|
/* FIXME handle casting to array type. */
|
||||||
|
|
||||||
ok = 0;
|
ok = 0;
|
||||||
if (can_convert_arg (strip_all_pointer_quals (type),
|
if (IS_AGGR_TYPE (intype)
|
||||||
strip_all_pointer_quals (intype), expr))
|
? can_convert_arg (type, intype, expr)
|
||||||
|
: can_convert_arg (strip_all_pointer_quals (type),
|
||||||
|
strip_all_pointer_quals (intype), expr))
|
||||||
ok = 1;
|
ok = 1;
|
||||||
else if (TYPE_PTROB_P (type) && TYPE_PTROB_P (intype))
|
else if (TYPE_PTROB_P (type) && TYPE_PTROB_P (intype))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue