This is the mail archive of the
libstdc++-cvs@gcc.gnu.org
mailing list for the libstdc++ project.
r192141 - in /trunk: gcc/cp/ChangeLog gcc/cp/ca...
- From: jakub at gcc dot gnu dot org
- To: libstdc++-cvs at gcc dot gnu dot org
- Date: Fri, 05 Oct 2012 19:30:42 -0000
- Subject: r192141 - in /trunk: gcc/cp/ChangeLog gcc/cp/ca...
Author: jakub
Date: Fri Oct 5 19:30:39 2012
New Revision: 192141
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192141
Log:
cp/
* cp-tree.h (SIZEOF_EXPR_TYPE_P): Define.
* tree.c (cp_tree_equal): Handle SIZEOF_EXPR with
SIZEOF_EXPR_TYPE_P.
* mangle.c (write_expression): Likewise.
* cxx-pretty-print.c (pp_cxx_unary_expression): Likewise.
* error.c (dump_expr): Likewise.
* parser.c (cp_parser_unary_expression): For sizeof call
cxx_sizeof_or_alignof_{type,expr} just for diagnostics and
return SIZEOF_EXPR with the operand.
* pt.c (tsubst_copy, tsubst_copy_and_build): For SIZEOF_EXPR,
call cxx_sizeof_or_alignof_{type,expr} for diagnostics, but
return SIZEOF_EXPR with tsubsted operand.
(value_dependent_expression_p): Handle SIZEOF_EXPR with
SIZEOF_EXPR_TYPE_P.
(instantiation_dependent_r): Likewise.
* call.c (null_ptr_cst_p): Call maybe_constant_value for C++98.
* semantics.c (finish_call_expr): Call
sizeof_pointer_memaccess_warning if needed.
(cxx_eval_constant_expression): Handle SIZEOF_EXPR.
(potential_constant_expression_1): Remove early exit for
C++98. Handle PROPERTY_REF.
* decl.c (duplicate_decls): When redeclaring a builtin function,
keep the merged decl builtin also if newdecl is a gnu_inline
inline definition.
(fold_sizeof_expr_r): New function.
(compute_array_index_type): Fold SIZEOF_EXPRs in itype.
* cp-gimplify.c (cp_genericize_r): Fold SIZEOF_EXPR.
* typeck.c (cp_build_binary_op): For warn_for_sign_compare
try harder using maybe_constant_value to get INTEGER_CSTs.
* decl.c (stabilize_vla_size): Call pointer_set_destroy
at the end.
testsuite/
* g++.dg/torture/Wsizeof-pointer-memaccess1.C: New test.
* g++.dg/torture/Wsizeof-pointer-memaccess2.C: New test.
* g++.dg/warn/Wsign-compare-5.C: New test.
* g++.dg/warn/Wsizeof-pointer-memaccess-1.C: New test.
* g++.dg/warn/Wnull-conversion-1.C: For c++11 add dg-error.
* g++.dg/ext/builtin30.C: New test.
* g++.dg/ext/vla12.C: New test.
* gcc.dg/builtins-85.c: New test.
libstdc++-v3/
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust line
numbers.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/20_util/shared_ptr/cons/43820_neg.cc
Changes in other areas also in this revision:
Added:
trunk/gcc/testsuite/g++.dg/ext/builtin30.C
trunk/gcc/testsuite/g++.dg/ext/vla12.C
trunk/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
trunk/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
trunk/gcc/testsuite/g++.dg/warn/Wsign-compare-5.C
trunk/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
trunk/gcc/testsuite/gcc.dg/builtins-85.c
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-gimplify.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/cxx-pretty-print.c
trunk/gcc/cp/decl.c
trunk/gcc/cp/error.c
trunk/gcc/cp/mangle.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/tree.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C