summaryrefslogtreecommitdiffstats
path: root/gcc/c-convert.c
Commit message (Collapse)AuthorAgeFilesLines
* * c-common.c (boolean_increment): New function.jsm282000-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37428 138bc75d-0d04-0410-961f-82ee72b054a4
* Vector conversions supportcrux2000-06-241-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34680 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c (convert): Handle REFERENCE_TYPE like POINTER_TYPE.kenner2000-04-101-1/+1
| | | | | | | * c-typeck.c (convert_for_assignment): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33058 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-convert.c (convert): Return if output or input type is ERROR_MARK.kenner2000-03-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32759 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge in gcc2-ss-010999law1999-09-071-0/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
* Copyright fixes.law1999-01-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24535 138bc75d-0d04-0410-961f-82ee72b054a4
* Wed May 6 06:35:38 1998 Robert Lipe <robertl@dgii.com>robertl1998-05-061-0/+1
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19563 138bc75d-0d04-0410-961f-82ee72b054a4
* Update FSF address.kenner1995-06-151-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@9959 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): Handle conversion to complex type.rms1993-03-041-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3640 138bc75d-0d04-0410-961f-82ee72b054a4
* Cygnus<-->FSF merge.brendan1993-01-091-324/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@3162 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Handle TRUTH_XOR_EXPR.kenner1992-12-301-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2994 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Don't pass truncation thru lshiftrms1992-09-111-3/+15
| | | | | | | if shift count >= width of narrower type. Instead, just use 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2104 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): When optimizing LSHIFT_EXPR andrms1992-09-091-11/+11
| | | | | | | RSHIFT_EXPR, do compares at tree level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2086 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): When converting to variant of same type, fold.rms1992-08-141-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1824 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): If main variants match,rms1992-07-311-1/+3
| | | | | | | but the type is not identical, make a NOP_EXPR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1725 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert): Succeed if TYPE is the main variant of the given type.rms1992-07-281-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1698 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Don't add a NOP_EXPR in cases where we cankenner1992-07-171-17/+14
| | | | | | | simply change the type of the entire tree. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1616 138bc75d-0d04-0410-961f-82ee72b054a4
* (convert_to_integer): Push truncation inside COND_EXPR.rms1992-07-171-0/+7
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@1609 138bc75d-0d04-0410-961f-82ee72b054a4
* entered into RCSwood1992-04-211-1/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@812 138bc75d-0d04-0410-961f-82ee72b054a4
* Initial revisionrms1992-01-291-0/+397
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud