-
- Downloads
re PR c++/11667 (wider-than-int enums never compare equal to 0)
PR c++/11667 * c-common.c (shorten_compare): Take into account differences between C and C++ representation for enumeration types. * tree.h (set_min_and_max_values_for_integral_type): Declare. * stor-layout.c (set_min_and_max_values_for_integral_type): New function, broken out from ... (fixup_signed_type): ... here and ... (fixup_unsigned_type): ... here. PR c++/11667 * call.c (standard_conversion): Allow all integral->enumeral conversions, after marking them as bad. * decl.c (finish_enum): Make sure that all enumerators are properly converted to the underlying type. (build_enumerator): Set DECL_CONTEXT for namespace-scope enumeration types. * pt.c (tsubst_copy): Adjust handling of CONST_DECLs accordingly. (tsubst_enum): Tidy. * Make-lang.in (typeck.o): Depend on convert.h. (class.o): Likewise. (rtti.o): Likewise. * call.c: Include convert.h. (convert_arg_to_ellipsis): Use convert_to_real. * class.c: Include convert.h. (build_base_path): Use convert_to_integer. * rtti.c: Include convert.h. (build_headof): Use convert_to_integer. * typeck.c: Include convert.h. (decay_conversion): Use convert_to_integer. (build_unary_op): Use build_nop. (get_delta_difference): Use convert_to_integer. (build_ptrmemfunc): Avoid unncessary conversions. From-SVN: r69909
Showing
- gcc/ChangeLog 11 additions, 0 deletionsgcc/ChangeLog
- gcc/c-common.c 6 additions, 4 deletionsgcc/c-common.c
- gcc/cp/ChangeLog 27 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/Make-lang.in 4 additions, 4 deletionsgcc/cp/Make-lang.in
- gcc/cp/call.c 3 additions, 3 deletionsgcc/cp/call.c
- gcc/cp/class.c 4 additions, 2 deletionsgcc/cp/class.c
- gcc/cp/decl.c 86 additions, 34 deletionsgcc/cp/decl.c
- gcc/cp/pt.c 9 additions, 6 deletionsgcc/cp/pt.c
- gcc/cp/rtti.c 3 additions, 2 deletionsgcc/cp/rtti.c
- gcc/cp/typeck.c 28 additions, 46 deletionsgcc/cp/typeck.c
- gcc/stor-layout.c 56 additions, 28 deletionsgcc/stor-layout.c
- gcc/testsuite/ChangeLog 6 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/g++.dg/init/enum2.C 9 additions, 0 deletionsgcc/testsuite/g++.dg/init/enum2.C
- gcc/testsuite/g++.dg/template/overload1.C 1 addition, 0 deletionsgcc/testsuite/g++.dg/template/overload1.C
- gcc/tree.h 1 addition, 0 deletionsgcc/tree.h
Loading
Please register or sign in to comment