aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-convert.c
AgeCommit message (Collapse)AuthorFilesLines
2000-11-13c-common.c (boolean_increment): New function.Joseph Myers1-0/+2
* c-common.c (boolean_increment): New function. * c-common.h (enum c_tree_index): Add CTI_C_BOOL_TYPE, CTI_C_BOOL_TRUE and CTI_C_BOOL_FALSE. (c_bool_type_node, c_bool_true_node, c_bool_false_node): Define. (boolean_increment): Declare. * c-convert.c (convert): Allow for BOOLEAN_TYPE. * c-decl.c (init_decl_processing): Create boolean nodes. (finish_struct): Allow for _Bool bitfields. * c-parse.in (reswords): Add _Bool. (rid_to_yy): Allow for RID_BOOL. * c-typeck.c (default_conversion): Make booleans promote to int. (convert_arguments, build_unary_op, build_modify_expr, convert_for_assignment): Allow for booleans. * ginclude/stdbool.h: Make conforming to C99. cp: * typeck.c (build_unary_op): Use boolean_increment from c-common.c, moving the relevant code there. testsuite: * gcc.dg/c99-bool-1.c: New test. From-SVN: r37428
2000-06-24Vector conversions supportBernd Schmidt1-0/+2
From-SVN: r34680
2000-04-10c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.Richard Kenner1-1/+1
* c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE. * c-typeck.c (convert_for_assignment): Likewise. From-SVN: r33058
2000-03-26c-convert.c (convert): Return if output or input type is ERROR_MARK.Richard Kenner1-1/+3
* c-convert.c (convert): Return if output or input type is ERROR_MARK. * c-decl.c (duplicate_decls): Only look at DECL_BUILT_IN_NONANSI and DECL_INLINE if FUNCTION_DECL. (pushdecl, redeclaration_error_message): Likewise, for DECL_INLINE. (store_parm_decls): Check for type of PARM_DECL being ERROR_MARK. Use DECL_WEAK, not DECL_RESULT, to flag for already seen. (combine_parm_decls): Likewise. * ggc-common.c (gcc_mark_tree_children, case 'd'): Use DECL_RESULT_FLD. * print-tree.c (print_node): Likewise. Only test DECL_PACKED, DECL_INLINE, DECL_BIT_FIELD, and DECL_TRANSPARENT_UNION on proper decl types. Properly handly DECL_INCOMING_RTL and DECL_SAVED_INSNS. * stor-layout.c (layout_decl): Only check DECL_PACKED and DECL_BIT_FIELD of FIELD_DECL. * tree.h (DECL_RESULT_FLD): New macro. * cp/class.c (check_field_decl): Fix typo. (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS. (check_methods): Likewise. (check_field_decls): Likewise. Use DECL_CONTEXT, not DECL_FIELD_CONTEXT. * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT): Use DECL_RESULT_FLD, not DECL_RESULT. * cp/decl.c (xref_tag): Use DECL_TEMPLATE_RESULT. * cp/lex.c (identifier_type): Likewise. * cp/pt.c (determine_specialization, lookup_template_class): Likewise. (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise. (resolve_overloaded_unification, more_specialized): Likewise. * cp/semantics.c (finish_member_declaration): Likewise. * cp/typeck.c (build_x_function_call): Likewise. From-SVN: r32759
1999-09-06Merge in gcc2-ss-010999Jeff Law1-0/+1
From-SVN: r29150
1999-01-06Copyright fixes.Jeff Law1-1/+1
From-SVN: r24535
1998-05-06toplev.h: New file.Robert Lipe1-0/+1
Wed May 6 06:35:38 1998 Robert Lipe <robertl@dgii.com> * toplev.h: New file. Protypes for functions in toplev.c. * tree.h, rtl.h: Deleted protos for functions in toplev.c. * c-common.c, c-convert.c, c-decl.c, c-iterate.c, c-lex.c, c-parse.in, c-parse.y, c-pragma.c, c-typeck.c, calls.c, convert.c, dwarf2out.c, except.c, expr.c, final.c, fold-const.c, function.c, hash.c, profile.c, real.c, reg-stack.c, regclass.c, reload.c, reload1.c, stmt.c, stor-layout.c, tlink.c, tree.c, varasm.c: include it. From-SVN: r19563
1995-06-15Update FSF address.Richard Kenner1-1/+2
From-SVN: r9959
1993-03-04(convert): Handle conversion to complex type.Richard Stallman1-0/+2
From-SVN: r3640
1993-01-08Cygnus<-->FSF merge.Brendan Kehoe1-324/+2
From-SVN: r3162
1992-12-30(convert_to_integer): Handle TRUTH_XOR_EXPR.Richard Kenner1-1/+1
From-SVN: r2994
1992-09-11(convert_to_integer): Don't pass truncation thru lshift if shift count >= ↵Richard Stallman1-3/+15
width of narrower type. (convert_to_integer): Don't pass truncation thru lshift if shift count >= width of narrower type. Instead, just use 0. From-SVN: r2104
1992-09-09(convert_to_integer): When optimizing LSHIFT_EXPR andRichard Stallman1-11/+11
RSHIFT_EXPR, do compares at tree level. From-SVN: r2086
1992-08-14(convert): When converting to variant of same type, fold.Richard Stallman1-1/+1
From-SVN: r1824
1992-07-31(convert): If main variants match,Richard Stallman1-1/+3
but the type is not identical, make a NOP_EXPR. From-SVN: r1725
1992-07-28(convert): Succeed if TYPE is the main variant of the given type.Richard Stallman1-1/+2
From-SVN: r1698
1992-07-17(convert_to_integer): Don't add a NOP_EXPR in cases where we canRichard Kenner1-17/+14
simply change the type of the entire tree. From-SVN: r1616
1992-07-17(convert_to_integer): Push truncation inside COND_EXPR.Richard Stallman1-0/+7
From-SVN: r1609
1992-04-21entered into RCSTom Wood1-1/+0
From-SVN: r812
1992-01-29Initial revisionRichard Stallman1-0/+397
From-SVN: r247