gcc/libstdc++-v3/libsupc++
Ian Lance Taylor 2a67bec24f re PR c++/19564 (-Wparentheses does not work with the C++ front-end)
PR c++/19564
	PR c++/19756
gcc/:
	* c-typeck.c (parser_build_binary_op): Move parentheses warnings
	to warn_about_parentheses in c-common.c.
	* c-common.c (warn_about_parentheses): New function.
	* c-common.h (warn_about_parentheses): Declare.
	* doc/invoke.texi (Warning Options): Update -Wparentheses
	description.
gcc/cp/:
	* parser.c (cp_parser_expression_stack_entry): Add field
	lhs_type.
	(cp_parser_binary_expression): Track tree code of left hand side
	of expression.  Use it when calling build_x_binary_op.
	(cp_parser_selection_statement): Add if_p parameter.  Change all
	callers.  Warn about ambiguous else.
	(cp_parser_statement): Add if_p parameter.  Change all callers.
	(cp_parser_implicitly_scoped_statement): Likewise.
	* typeck.c (build_x_binary_op): Add parameters arg1_code and
	arg2_code.  Change all callers.  Call warn_about_parentheses.
	* cp-tree.h (build_x_binary_op): Update declaration.
gcc/testsuite/:
	* g++.dg/warn/Wparentheses-5.C: New test.
	* g++.dg/warn/Wparentheses-6.C: New test.
	* g++.dg/warn/Wparentheses-7.C: New test.
	* g++.dg/warn/Wparentheses-8.C: New test.
	* g++.dg/warn/Wparentheses-9.C: New test.
	* g++.dg/warn/Wparentheses-10.C: New test.
	* g++.dg/warn/Wparentheses-11.C: New test.
	* g++.dg/warn/Wparentheses-12.C: New test.
	* g++.dg/warn/Wparentheses-13.C: New test.
	* g++.dg/warn/Wparentheses-14.C: New test.
	* g++.dg/warn/Wparentheses-15.C: New test.
	* g++.dg/warn/Wparentheses-16.C: New test.
	* g++.dg/warn/Wparentheses-17.C: New test.
	* g++.dg/warn/Wparentheses-18.C: New test.
	* g++.dg/warn/Wparentheses-19.C: New test.
	* g++.dg/warn/Wparentheses-20.C: New test.
	* g++.dg/warn/Wparentheses-21.C: New test.
libstdc++-v3/:
	* include/bits/locale_facets.tcc (num_get<>::_M_extract_float):
	Add parentheses around && within || to avoid warning.
	(num_get<>::_M_extract_int): Likewise.
	(money_get<>::_M_extract): Likewise.
	(num_get<>::do_get(iter_type, iter_type, ios_base&,
	ios_base::iostate&, void*&)): Add parentheses around & within | to
	avoid warning.
	(num_put<>::do_put(iter_type, ios_base&, char_type, const void*)):
	Likewise.
	* include/bits/streambuf_iterator.h (istreambuf_iterator::equal):
	Add parentheses around && within || to avoid warning.
	* libsupc++/tinfo.cc (__do_dyncast): Likewise.
	* src/locale.cc (locale::_S_normalize_category): Likewise.
	* include/bits/stl_tree.h (_Rb_tree<>::_M_insert_unique): Add
	braces to avoid ambiguous else warning.
	* src/strstream.cc (strstreambuf::_M_free): Likewise.
	* src/tree.cc (_Rb_tree_rebalance_for_erase): Likewise.

From-SVN: r119855
2006-12-14 05:49:06 +00:00
..
cxxabi.h re PR libstdc++/29095 (cxxabi.h __cxa_cdtor_type not declared when included from "C") 2006-10-09 23:53:35 +00:00
del_op.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
del_opnt.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
del_opv.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
del_opvnt.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_alloc.cc atomicity.h: Move to... 2006-09-14 09:48:15 +00:00
eh_arm.cc eh_arm.cc (__cxa_begin_cleanup): Always return 'true'. 2006-06-20 14:08:31 +00:00
eh_aux_runtime.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
eh_call.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_catch.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_exception.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_globals.cc eh_globals.cc (__cxxabiv1::__cxa_get_globals): Initialize propagatingExceptions if __ARM_EABI_UNWINDER__. 2006-11-13 13:28:28 +00:00
eh_personality.cc eh_globals.cc (__cxxabiv1::__cxa_get_globals): Initialize propagatingExceptions if __ARM_EABI_UNWINDER__. 2006-11-13 13:28:28 +00:00
eh_term_handler.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_terminate.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
eh_throw.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
eh_type.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
eh_unex_handler.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
exception throw_allocator.h: Consistent @file markup. 2006-11-29 20:59:22 +00:00
exception_defines.h throw_allocator.h: Consistent @file markup. 2006-11-29 20:59:22 +00:00
guard.cc re PR libstdc++/29426 (static __recursive_mutex init vs __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION) 2006-10-11 20:18:36 +00:00
Makefile.am libtool-ldflags: New script. 2006-01-03 00:30:27 +00:00
Makefile.in Makefile.am (tr1_headers): Add new tuple_defs.h. 2006-10-16 19:08:22 +00:00
new throw_allocator.h: Consistent @file markup. 2006-11-29 20:59:22 +00:00
new_handler.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
new_op.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
new_opnt.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
new_opv.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
new_opvnt.cc del_op.cc: Include c++config.h first. 2005-11-22 00:19:07 +00:00
pure.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
tinfo2.cc bpapi.h (TARGET_BPABI_CPP_BUILTINS): Define __GXX_TYPEINFO_EQUALITY_INLINE but not __GXX_MERGED_TYPEINFO_NAMES. 2006-11-13 13:10:17 +00:00
tinfo.cc re PR c++/19564 (-Wparentheses does not work with the C++ front-end) 2006-12-14 05:49:06 +00:00
tinfo.h All files: Update FSF address. 2005-08-17 02:28:44 +00:00
typeinfo throw_allocator.h: Consistent @file markup. 2006-11-29 20:59:22 +00:00
unwind-cxx.h All files: Update FSF address. 2005-08-17 02:28:44 +00:00
vec.cc All files: Update FSF address. 2005-08-17 02:28:44 +00:00
vterminate.cc c++config: Add in revised namespace associations. 2005-12-19 00:56:05 +00:00