aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/typeck.c
diff options
context:
space:
mode:
authorJason Merrill <jason@casey.cygnus.com>2000-04-11 00:38:39 +0000
committerJason Merrill <jason@gcc.gnu.org>2000-04-10 20:38:39 -0400
commit2bdb0643b3ae045242492171070c11957727150c (patch)
treec5516cfcd94a09cc0c73c7cf3b57d9e185fcbf03 /gcc/cp/typeck.c
parenta4ff8d98baa9fcc92bdd294d4db3e9d9146cd590 (diff)
downloadgcc-2bdb0643b3ae045242492171070c11957727150c.zip
gcc-2bdb0643b3ae045242492171070c11957727150c.tar.gz
gcc-2bdb0643b3ae045242492171070c11957727150c.tar.bz2
class.c (instantiate_type): Handle object-relative template-id.
* class.c (instantiate_type): Handle object-relative template-id. * semantics.c (finish_expr_stmt): Call convert_to_void here. * decl.c (cplus_expand_expr_stmt): Not here. * rtti.c (build_dynamic_cast_1): Call non_lvalue. Initialize exprtype earlier. * parse.y (fn.def1): Check for defining types in return types. * decl.c (check_tag_decl): Notice extra fundamental types. Diagnose empty decls in classes, too. * decl.c (grokdeclarator): Don't override an anonymous name if no declarator was given. * cvt.c (convert_to_void): Call resolve_offset_ref. * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF. * decl2.c (decl_namespace): Handle getting a type. * typeck.c (build_c_cast): Re-enable warning for cast between pointer and integer of different size. From-SVN: r33066
Diffstat (limited to 'gcc/cp/typeck.c')
-rw-r--r--gcc/cp/typeck.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 65d75c0..6b7cb69 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2669,6 +2669,8 @@ build_x_function_call (function, params, decl)
return build_method_call (decl, function, params,
NULL_TREE, LOOKUP_NORMAL);
}
+ else if (TREE_CODE (function) == OFFSET_REF)
+ my_friendly_abort (20000406);
else if (TREE_CODE (function) == COMPONENT_REF
&& type == unknown_type_node)
{
@@ -5473,9 +5475,6 @@ build_c_cast (type, expr)
cp_warning ("cast from `%T' to `%T' discards qualifiers from pointer target type",
otype, type);
-#if 0
- /* We should see about re-enabling these, they seem useful to
- me. */
if (TREE_CODE (type) == INTEGER_TYPE
&& TREE_CODE (otype) == POINTER_TYPE
&& TYPE_PRECISION (type) != TYPE_PRECISION (otype))
@@ -5488,7 +5487,6 @@ build_c_cast (type, expr)
provided the 0 was explicit--not cast or made by folding. */
&& !(TREE_CODE (value) == INTEGER_CST && integer_zerop (value)))
warning ("cast to pointer from integer of different size");
-#endif
if (TREE_CODE (type) == REFERENCE_TYPE)
value = (convert_from_reference