gcc/libstdc++-v3/include/bits
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
..
allocator.h
basic_ios.h
basic_ios.tcc
basic_string.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
basic_string.tcc
boost_concept_check.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
c++config localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
char_traits.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
codecvt.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
concept_check.h
cpp_type_traits.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
deque.tcc
fstream.tcc
functexcept.h
gslice_array.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
gslice.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
indirect_array.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
ios_base.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
istream.tcc
list.tcc
locale_classes.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
locale_facets.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
locale_facets.tcc re PR c++/19564 (-Wparentheses does not work with the C++ front-end) 2006-12-14 05:49:06 +00:00
localefwd.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
mask_array.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
ostream.tcc
postypes.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
slice_array.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
sstream.tcc
stl_algo.h
stl_algobase.h re PR libstdc++/29989 (missed #undef min/max in <limits>) 2006-12-03 17:15:46 +00:00
stl_bvector.h
stl_construct.h
stl_deque.h
stl_function.h
stl_heap.h
stl_iterator_base_funcs.h
stl_iterator_base_types.h
stl_iterator.h
stl_list.h
stl_map.h
stl_multimap.h
stl_multiset.h
stl_numeric.h
stl_pair.h
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h
stl_stack.h
stl_tempbuf.h
stl_tree.h re PR c++/19564 (-Wparentheses does not work with the C++ front-end) 2006-12-14 05:49:06 +00:00
stl_uninitialized.h
stl_vector.h
stream_iterator.h
streambuf_iterator.h re PR c++/19564 (-Wparentheses does not work with the C++ front-end) 2006-12-14 05:49:06 +00:00
streambuf.tcc
stringfwd.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
valarray_after.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
valarray_array.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
valarray_array.tcc
valarray_before.h localefwd.h: Consistent @file placement... 2006-12-05 23:24:07 +00:00
vector.tcc