diff options
author | YamaArashi <shadow962@live.com> | 2016-02-17 06:18:37 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-02-17 06:18:37 -0800 |
commit | 9cc5f8edb21ac07bff87def5155ee71dff449e37 (patch) | |
tree | b75b0eb06bf733811e4f54bd28dd6fa93fa8f485 | |
parent | 75ff61fd74b379f7278b1042e269ea3a6ee66518 (diff) |
get rid of PTR macros
55 files changed, 504 insertions, 512 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index b03b3db..10bad84 100755 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -627,6 +627,6 @@ bitmap_release_memory () if (bitmap_obstack_init) { bitmap_obstack_init = FALSE; - obstack_free (&bitmap_obstack, NULL_PTR); + obstack_free (&bitmap_obstack, NULL); } } diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index 929e4c3..be5599e 100755 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -87,13 +87,13 @@ affix_data_type (type_or_decl) add a blank after the data-type of course. */ if (p == type_or_decl) - return concat (data_type, " ", type_or_decl, NULL_PTR); + return concat (data_type, " ", type_or_decl, NULL); saved = *p; *p = '\0'; - qualifiers_then_data_type = concat (type_or_decl, data_type, NULL_PTR); + qualifiers_then_data_type = concat (type_or_decl, data_type, NULL); *p = saved; - return concat (qualifiers_then_data_type, " ", p, NULL_PTR); + return concat (qualifiers_then_data_type, " ", p, NULL); } /* Given a tree node which represents some "function type", generate the @@ -120,13 +120,13 @@ gen_formal_list_for_type (fntype, style) char *this_type; if (*formal_list) - formal_list = concat (formal_list, ", ", NULL_PTR); + formal_list = concat (formal_list, ", ", NULL); this_type = gen_type ("", TREE_VALUE (formal_type), ansi); formal_list = ((strlen (this_type)) - ? concat (formal_list, affix_data_type (this_type), NULL_PTR) - : concat (formal_list, data_type, NULL_PTR)); + ? concat (formal_list, affix_data_type (this_type), NULL) + : concat (formal_list, data_type, NULL)); formal_type = TREE_CHAIN (formal_type); } @@ -175,10 +175,10 @@ gen_formal_list_for_type (fntype, style) petered out to a NULL (i.e. without being terminated by a void_type_node) then we need to tack on an ellipsis. */ if (!formal_type) - formal_list = concat (formal_list, ", ...", NULL_PTR); + formal_list = concat (formal_list, ", ...", NULL); } - return concat (" (", formal_list, ")", NULL_PTR); + return concat (" (", formal_list, ")", NULL); } /* For the generation of an ANSI prototype for a function definition, we have @@ -237,23 +237,23 @@ gen_formal_list_for_func_def (fndecl, style) char *this_formal; if (*formal_list && ((style == ansi) || (style == k_and_r_names))) - formal_list = concat (formal_list, ", ", NULL_PTR); + formal_list = concat (formal_list, ", ", NULL); this_formal = gen_decl (formal_decl, 0, style); if (style == k_and_r_decls) - formal_list = concat (formal_list, this_formal, "; ", NULL_PTR); + formal_list = concat (formal_list, this_formal, "; ", NULL); else - formal_list = concat (formal_list, this_formal, NULL_PTR); + formal_list = concat (formal_list, this_formal, NULL); formal_decl = TREE_CHAIN (formal_decl); } if (style == ansi) { if (!DECL_ARGUMENTS (fndecl)) - formal_list = concat (formal_list, "void", NULL_PTR); + formal_list = concat (formal_list, "void", NULL); if (deserves_ellipsis (TREE_TYPE (fndecl))) - formal_list = concat (formal_list, ", ...", NULL_PTR); + formal_list = concat (formal_list, ", ...", NULL); } if ((style == ansi) || (style == k_and_r_names)) - formal_list = concat (" (", formal_list, ")", NULL_PTR); + formal_list = concat (" (", formal_list, ")", NULL); return formal_list; } @@ -315,14 +315,14 @@ gen_type (ret_val, t, style) { case POINTER_TYPE: if (TYPE_READONLY (t)) - ret_val = concat ("const ", ret_val, NULL_PTR); + ret_val = concat ("const ", ret_val, NULL); if (TYPE_VOLATILE (t)) - ret_val = concat ("volatile ", ret_val, NULL_PTR); + ret_val = concat ("volatile ", ret_val, NULL); - ret_val = concat ("*", ret_val, NULL_PTR); + ret_val = concat ("*", ret_val, NULL); if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) - ret_val = concat ("(", ret_val, ")", NULL_PTR); + ret_val = concat ("(", ret_val, ")", NULL); ret_val = gen_type (ret_val, TREE_TYPE (t), style); @@ -330,17 +330,17 @@ gen_type (ret_val, t, style) case ARRAY_TYPE: if (TYPE_SIZE (t) == 0 || TREE_CODE (TYPE_SIZE (t)) != INTEGER_CST) - ret_val = gen_type (concat (ret_val, "[]", NULL_PTR), + ret_val = gen_type (concat (ret_val, "[]", NULL), TREE_TYPE (t), style); else if (int_size_in_bytes (t) == 0) - ret_val = gen_type (concat (ret_val, "[0]", NULL_PTR), + ret_val = gen_type (concat (ret_val, "[0]", NULL), TREE_TYPE (t), style); else { int size = (int_size_in_bytes (t) / int_size_in_bytes (TREE_TYPE (t))); char buff[10]; sprintf (buff, "[%d]", size); - ret_val = gen_type (concat (ret_val, buff, NULL_PTR), + ret_val = gen_type (concat (ret_val, buff, NULL), TREE_TYPE (t), style); } break; @@ -348,7 +348,7 @@ gen_type (ret_val, t, style) case FUNCTION_TYPE: ret_val = gen_type (concat (ret_val, gen_formal_list_for_type (t, style), - NULL_PTR), + NULL), TREE_TYPE (t), style); break; @@ -377,13 +377,13 @@ gen_type (ret_val, t, style) while (chain_p) { data_type = concat (data_type, gen_decl (chain_p, 0, ansi), - NULL_PTR); + NULL); chain_p = TREE_CHAIN (chain_p); - data_type = concat (data_type, "; ", NULL_PTR); + data_type = concat (data_type, "; ", NULL); } - data_type = concat ("{ ", data_type, "}", NULL_PTR); + data_type = concat ("{ ", data_type, "}", NULL); } - data_type = concat ("struct ", data_type, NULL_PTR); + data_type = concat ("struct ", data_type, NULL); break; case UNION_TYPE: @@ -396,13 +396,13 @@ gen_type (ret_val, t, style) while (chain_p) { data_type = concat (data_type, gen_decl (chain_p, 0, ansi), - NULL_PTR); + NULL); chain_p = TREE_CHAIN (chain_p); - data_type = concat (data_type, "; ", NULL_PTR); + data_type = concat (data_type, "; ", NULL); } - data_type = concat ("{ ", data_type, "}", NULL_PTR); + data_type = concat ("{ ", data_type, "}", NULL); } - data_type = concat ("union ", data_type, NULL_PTR); + data_type = concat ("union ", data_type, NULL); break; case ENUMERAL_TYPE: @@ -415,14 +415,14 @@ gen_type (ret_val, t, style) while (chain_p) { data_type = concat (data_type, - IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), NULL_PTR); + IDENTIFIER_POINTER (TREE_PURPOSE (chain_p)), NULL); chain_p = TREE_CHAIN (chain_p); if (chain_p) - data_type = concat (data_type, ", ", NULL_PTR); + data_type = concat (data_type, ", ", NULL); } - data_type = concat ("{ ", data_type, " }", NULL_PTR); + data_type = concat ("{ ", data_type, " }", NULL); } - data_type = concat ("enum ", data_type, NULL_PTR); + data_type = concat ("enum ", data_type, NULL); break; case TYPE_DECL: @@ -434,7 +434,7 @@ gen_type (ret_val, t, style) /* Normally, `unsigned' is part of the deal. Not so if it comes with a type qualifier. */ if (TREE_UNSIGNED (t) && TYPE_QUALS (t)) - data_type = concat ("unsigned ", data_type, NULL_PTR); + data_type = concat ("unsigned ", data_type, NULL); break; case REAL_TYPE: @@ -454,11 +454,11 @@ gen_type (ret_val, t, style) } } if (TYPE_READONLY (t)) - ret_val = concat ("const ", ret_val, NULL_PTR); + ret_val = concat ("const ", ret_val, NULL); if (TYPE_VOLATILE (t)) - ret_val = concat ("volatile ", ret_val, NULL_PTR); + ret_val = concat ("volatile ", ret_val, NULL); if (TYPE_RESTRICT (t)) - ret_val = concat ("restrict ", ret_val, NULL_PTR); + ret_val = concat ("restrict ", ret_val, NULL); return ret_val; } @@ -500,9 +500,9 @@ gen_decl (decl, is_func_definition, style) generate the qualifiers here. */ if (TREE_THIS_VOLATILE (decl)) - ret_val = concat ("volatile ", ret_val, NULL_PTR); + ret_val = concat ("volatile ", ret_val, NULL); if (TREE_READONLY (decl)) - ret_val = concat ("const ", ret_val, NULL_PTR); + ret_val = concat ("const ", ret_val, NULL); data_type = ""; @@ -521,7 +521,7 @@ gen_decl (decl, is_func_definition, style) if (TREE_CODE (decl) == FUNCTION_DECL && is_func_definition) { ret_val = concat (ret_val, gen_formal_list_for_func_def (decl, ansi), - NULL_PTR); + NULL); /* Since we have already added in the formals list stuff, here we don't add the whole "type" of the function we are considering (which @@ -538,11 +538,11 @@ gen_decl (decl, is_func_definition, style) ret_val = affix_data_type (ret_val); if (TREE_CODE (decl) != FUNCTION_DECL && DECL_REGISTER (decl)) - ret_val = concat ("register ", ret_val, NULL_PTR); + ret_val = concat ("register ", ret_val, NULL); if (TREE_PUBLIC (decl)) - ret_val = concat ("extern ", ret_val, NULL_PTR); + ret_val = concat ("extern ", ret_val, NULL); if (TREE_CODE (decl) == FUNCTION_DECL && !TREE_PUBLIC (decl)) - ret_val = concat ("static ", ret_val, NULL_PTR); + ret_val = concat ("static ", ret_val, NULL); return ret_val; } diff --git a/gcc/c-decl.c b/gcc/c-decl.c index fa028a5..9c0a33e 100755 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -429,7 +429,7 @@ static tree lookup_tag_reverse (tree); static tree grokdeclarator (tree, tree, enum decl_context, int); static tree grokparms (tree, int); -static int field_decl_cmp (const GENERIC_PTR, const GENERIC_PTR); +static int field_decl_cmp (const void *, const void *); static void layout_array_type (tree); /* C-specific option variables. */ @@ -2609,7 +2609,7 @@ implicitly_declare (functionid) If flag_traditional is set, pushdecl does it top-level. */ pushdecl (decl); - rest_of_decl_compilation (decl, NULL_PTR, 0, 0); + rest_of_decl_compilation (decl, NULL, 0, 0); if (mesg_implicit_function_declaration && implicit_warning) { @@ -3321,41 +3321,41 @@ init_decl_processing () tree_cons (NULL_TREE, ptr_type_node, endlink)); builtin_function ("__builtin_constant_p", default_function_type, - BUILT_IN_CONSTANT_P, NULL_PTR); + BUILT_IN_CONSTANT_P, NULL); builtin_function ("__builtin_return_address", build_function_type (ptr_type_node, tree_cons (NULL_TREE, unsigned_type_node, endlink)), - BUILT_IN_RETURN_ADDRESS, NULL_PTR); + BUILT_IN_RETURN_ADDRESS, NULL); builtin_function ("__builtin_frame_address", build_function_type (ptr_type_node, tree_cons (NULL_TREE, unsigned_type_node, endlink)), - BUILT_IN_FRAME_ADDRESS, NULL_PTR); + BUILT_IN_FRAME_ADDRESS, NULL); builtin_function ("__builtin_aggregate_incoming_address", build_function_type (ptr_type_node, NULL_TREE), - BUILT_IN_AGGREGATE_INCOMING_ADDRESS, NULL_PTR); + BUILT_IN_AGGREGATE_INCOMING_ADDRESS, NULL); /* Hooks for the DWARF 2 __throw routine. */ builtin_function ("__builtin_unwind_init", build_function_type (void_type_node, endlink), - BUILT_IN_UNWIND_INIT, NULL_PTR); + BUILT_IN_UNWIND_INIT, NULL); builtin_function ("__builtin_dwarf_cfa", ptr_ftype_void, - BUILT_IN_DWARF_CFA, NULL_PTR); + BUILT_IN_DWARF_CFA, NULL); builtin_function ("__builtin_dwarf_fp_regnum", build_function_type (unsigned_type_node, endlink), - BUILT_IN_DWARF_FP_REGNUM, NULL_PTR); + BUILT_IN_DWARF_FP_REGNUM, NULL); builtin_function ("__builtin_dwarf_reg_size", int_ftype_int, - BUILT_IN_DWARF_REG_SIZE, NULL_PTR); + BUILT_IN_DWARF_REG_SIZE, NULL); builtin_function ("__builtin_frob_return_addr", ptr_ftype_ptr, - BUILT_IN_FROB_RETURN_ADDR, NULL_PTR); + BUILT_IN_FROB_RETURN_ADDR, NULL); builtin_function ("__builtin_extract_return_addr", ptr_ftype_ptr, - BUILT_IN_EXTRACT_RETURN_ADDR, NULL_PTR); + BUILT_IN_EXTRACT_RETURN_ADDR, NULL); builtin_function ("__builtin_eh_return", build_function_type (void_type_node, @@ -3365,7 +3365,7 @@ init_decl_processing () tree_cons (NULL_TREE, ptr_type_node, endlink)))), - BUILT_IN_EH_RETURN, NULL_PTR); + BUILT_IN_EH_RETURN, NULL); builtin_function ("__builtin_alloca", build_function_type (ptr_type_node, @@ -3373,7 +3373,7 @@ init_decl_processing () sizetype, endlink)), BUILT_IN_ALLOCA, "alloca"); - builtin_function ("__builtin_ffs", int_ftype_int, BUILT_IN_FFS, NULL_PTR); + builtin_function ("__builtin_ffs", int_ftype_int, BUILT_IN_FFS, NULL); /* Define alloca, ffs as builtins. Declare _exit just to mark it as volatile. */ if (! flag_no_builtin && !flag_no_nonansi_builtin) @@ -3383,32 +3383,32 @@ init_decl_processing () tree_cons (NULL_TREE, sizetype, endlink)), - BUILT_IN_ALLOCA, NULL_PTR); + BUILT_IN_ALLOCA, NULL); /* Suppress error if redefined as a non-function. */ DECL_BUILT_IN_NONANSI (temp) = 1; - temp = builtin_function ("ffs", int_ftype_int, BUILT_IN_FFS, NULL_PTR); + temp = builtin_function ("ffs", int_ftype_int, BUILT_IN_FFS, NULL); /* Suppress error if redefined as a non-function. */ DECL_BUILT_IN_NONANSI (temp) = 1; temp = builtin_function ("_exit", void_ftype_any, NOT_BUILT_IN, - NULL_PTR); + NULL); TREE_THIS_VOLATILE (temp) = 1; TREE_SIDE_EFFECTS (temp) = 1; /* Suppress error if redefined as a non-function. */ DECL_BUILT_IN_NONANSI (temp) = 1; } - builtin_function ("__builtin_abs", int_ftype_int, BUILT_IN_ABS, NULL_PTR); + builtin_function ("__builtin_abs", int_ftype_int, BUILT_IN_ABS, NULL); builtin_function ("__builtin_fabsf", float_ftype_float, BUILT_IN_FABS, - NULL_PTR); + NULL); builtin_function ("__builtin_fabs", double_ftype_double, BUILT_IN_FABS, - NULL_PTR); + NULL); builtin_function ("__builtin_fabsl", ldouble_ftype_ldouble, BUILT_IN_FABS, - NULL_PTR); + NULL); builtin_function ("__builtin_labs", long_ftype_long, BUILT_IN_LABS, - NULL_PTR); + NULL); builtin_function ("__builtin_saveregs", build_function_type (ptr_type_node, NULL_TREE), - BUILT_IN_SAVEREGS, NULL_PTR); + BUILT_IN_SAVEREGS, NULL); /* EXPAND_BUILTIN_VARARGS is obsolete. */ #if 0 builtin_function ("__builtin_varargs", @@ -3416,24 +3416,24 @@ init_decl_processing () tree_cons (NULL_TREE, integer_type_node, endlink)), - BUILT_IN_VARARGS, NULL_PTR); + BUILT_IN_VARARGS, NULL); #endif builtin_function ("__builtin_classify_type", default_function_type, - BUILT_IN_CLASSIFY_TYPE, NULL_PTR); + BUILT_IN_CLASSIFY_TYPE, NULL); builtin_function ("__builtin_next_arg", build_function_type (ptr_type_node, NULL_TREE), - BUILT_IN_NEXT_ARG, NULL_PTR); + BUILT_IN_NEXT_ARG, NULL); builtin_function ("__builtin_args_info", build_function_type (integer_type_node, tree_cons (NULL_TREE, integer_type_node, endlink)), - BUILT_IN_ARGS_INFO, NULL_PTR); + BUILT_IN_ARGS_INFO, NULL); /* Untyped call and return. */ builtin_function ("__builtin_apply_args", build_function_type (ptr_type_node, NULL_TREE), - BUILT_IN_APPLY_ARGS, NULL_PTR); + BUILT_IN_APPLY_ARGS, NULL); temp = tree_cons (NULL_TREE, build_pointer_type (build_function_type (void_type_node, @@ -3445,13 +3445,13 @@ init_decl_processing () endlink))); builtin_function ("__builtin_apply", build_function_type (ptr_type_node, temp), - BUILT_IN_APPLY, NULL_PTR); + BUILT_IN_APPLY, NULL); builtin_function ("__builtin_return", build_function_type (void_type_node, tree_cons (NULL_TREE, ptr_type_node, endlink)), - BUILT_IN_RETURN, NULL_PTR); + BUILT_IN_RETURN, NULL); /* CYGNUS LOCAL -- branch prediction */ builtin_function ("__builtin_expect", @@ -3460,7 +3460,7 @@ init_decl_processing () tree_cons (NULL_TREE, integer_type_node, endlink))), - BUILT_IN_EXPECT, NULL_PTR); + BUILT_IN_EXPECT, NULL); /* END CYGNUS LOCAL -- branch prediction */ @@ -3499,7 +3499,7 @@ init_decl_processing () build_function_type (integer_type_node, tree_cons (NULL_TREE, ptr_type_node, endlink)), - BUILT_IN_SETJMP, NULL_PTR); + BUILT_IN_SETJMP, NULL); builtin_function ("__builtin_longjmp", build_function_type (void_type_node, @@ -3507,10 +3507,10 @@ init_decl_processing () tree_cons (NULL_TREE, integer_type_node, endlink))), - BUILT_IN_LONGJMP, NULL_PTR); + BUILT_IN_LONGJMP, NULL); builtin_function ("__builtin_trap", build_function_type (void_type_node, endlink), - BUILT_IN_TRAP, NULL_PTR); + BUILT_IN_TRAP, NULL); /* In an ANSI C program, it is okay to supply built-in meanings for these functions, since applications cannot validly use them @@ -3518,41 +3518,41 @@ init_decl_processing () However, honor the -fno-builtin option. */ if (!flag_no_builtin) { - builtin_function ("abs", int_ftype_int, BUILT_IN_ABS, NULL_PTR); - builtin_function ("fabsf", float_ftype_float, BUILT_IN_FABS, NULL_PTR); - builtin_function ("fabs", double_ftype_double, BUILT_IN_FABS, NULL_PTR); + builtin_function ("abs", int_ftype_int, BUILT_IN_ABS, NULL); + builtin_function ("fabsf", float_ftype_float, BUILT_IN_FABS, NULL); + builtin_function ("fabs", double_ftype_double, BUILT_IN_FABS, NULL); builtin_function ("fabsl", ldouble_ftype_ldouble, BUILT_IN_FABS, - NULL_PTR); - builtin_function ("labs", long_ftype_long, BUILT_IN_LABS, NULL_PTR); - builtin_function ("memcpy", memcpy_ftype, BUILT_IN_MEMCPY, NULL_PTR); + NULL); + builtin_function ("labs", long_ftype_long, BUILT_IN_LABS, NULL); + builtin_function ("memcpy", memcpy_ftype, BUILT_IN_MEMCPY, NULL); builtin_function ("memcmp", int_ftype_cptr_cptr_sizet, BUILT_IN_MEMCMP, - NULL_PTR); - builtin_function ("memset", memset_ftype, BUILT_IN_MEMSET, NULL_PTR); + NULL); + builtin_function ("memset", memset_ftype, BUILT_IN_MEMSET, NULL); builtin_function ("strcmp", int_ftype_string_string, BUILT_IN_STRCMP, - NULL_PTR); + NULL); builtin_function ("strcpy", string_ftype_ptr_ptr, BUILT_IN_STRCPY, - NULL_PTR); - builtin_function ("strlen", strlen_ftype, BUILT_IN_STRLEN, NULL_PTR); - builtin_function ("sqrtf", float_ftype_float, BUILT_IN_FSQRT, NULL_PTR); - builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, NULL_PTR); + NULL); + builtin_function ("strlen", strlen_ftype, BUILT_IN_STRLEN, NULL); + builtin_function ("sqrtf", float_ftype_float, BUILT_IN_FSQRT, NULL); + builtin_function ("sqrt", double_ftype_double, BUILT_IN_FSQRT, NULL); builtin_function ("sqrtl", ldouble_ftype_ldouble, BUILT_IN_FSQRT, - NULL_PTR); - builtin_function ("sinf", float_ftype_float, BUILT_IN_SIN, NULL_PTR); - builtin_function ("sin", double_ftype_double, BUILT_IN_SIN, NULL_PTR); - builtin_function ("sinl", ldouble_ftype_ldouble, BUILT_IN_SIN, NULL_PTR); - builtin_function ("cosf", float_ftype_float, BUILT_IN_COS, NULL_PTR); - builtin_function ("cos", double_ftype_double, BUILT_IN_COS, NULL_PTR); - builtin_function ("cosl", ldouble_ftype_ldouble, BUILT_IN_COS, NULL_PTR); + NULL); + builtin_function ("sinf", float_ftype_float, BUILT_IN_SIN, NULL); + builtin_function ("sin", double_ftype_double, BUILT_IN_SIN, NULL); + builtin_function ("sinl", ldouble_ftype_ldouble, BUILT_IN_SIN, NULL); + builtin_function ("cosf", float_ftype_float, BUILT_IN_COS, NULL); + builtin_function ("cos", double_ftype_double, BUILT_IN_COS, NULL); + builtin_function ("cosl", ldouble_ftype_ldouble, BUILT_IN_COS, NULL); /* Declare these functions volatile to avoid spurious "control drops through" warnings. */ /* Don't specify the argument types, to avoid errors from certain code which isn't valid in ANSI but which exists. */ temp = builtin_function ("abort", void_ftype_any, NOT_BUILT_IN, - NULL_PTR); + NULL); TREE_THIS_VOLATILE (temp) = 1; TREE_SIDE_EFFECTS (temp) = 1; - temp = builtin_function ("exit", void_ftype_any, NOT_BUILT_IN, NULL_PTR); + temp = builtin_function ("exit", void_ftype_any, NOT_BUILT_IN, NULL); TREE_THIS_VOLATILE (temp) = 1; TREE_SIDE_EFFECTS (temp) = 1; } @@ -3560,20 +3560,20 @@ init_decl_processing () #if 0 /* Support for these has not been written in either expand_builtin or build_function_call. */ - builtin_function ("__builtin_div", default_ftype, BUILT_IN_DIV, NULL_PTR); - builtin_function ("__builtin_ldiv", default_ftype, BUILT_IN_LDIV, NULL_PTR); + builtin_function ("__builtin_div", default_ftype, BUILT_IN_DIV, NULL); + builtin_function ("__builtin_ldiv", default_ftype, BUILT_IN_LDIV, NULL); builtin_function ("__builtin_ffloor", double_ftype_double, BUILT_IN_FFLOOR, - NULL_PTR); + NULL); builtin_function ("__builtin_fceil", double_ftype_double, BUILT_IN_FCEIL, - NULL_PTR); + NULL); builtin_function ("__builtin_fmod", double_ftype_double_double, - BUILT_IN_FMOD, NULL_PTR); + BUILT_IN_FMOD, NULL); builtin_function ("__builtin_frem", double_ftype_double_double, - BUILT_IN_FREM, NULL_PTR); + BUILT_IN_FREM, NULL); builtin_function ("__builtin_getexp", double_ftype_double, BUILT_IN_GETEXP, - NULL_PTR); + NULL); builtin_function ("__builtin_getman", double_ftype_double, BUILT_IN_GETMAN, - NULL_PTR); + NULL); #endif pedantic_lvalues = pedantic; @@ -3618,7 +3618,7 @@ builtin_function (name, type, function_code, library_name) DECL_BUILT_IN_NONANSI (decl) = 1; if (library_name) DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name); - make_decl_rtl (decl, NULL_PTR, 1); + make_decl_rtl (decl, NULL, 1); pushdecl (decl); if (function_code != NOT_BUILT_IN) { @@ -4106,7 +4106,7 @@ finish_decl (decl, init, asmspec_tree) if (TREE_CODE (decl) == TYPE_DECL) { - rest_of_decl_compilation (decl, NULL_PTR, DECL_CONTEXT (decl) == 0, + rest_of_decl_compilation (decl, NULL, DECL_CONTEXT (decl) == 0, 0); } @@ -5773,8 +5773,8 @@ grokfield (filename, line, declarator, declspecs, width) static int field_decl_cmp (xp, yp) - const GENERIC_PTR xp; - const GENERIC_PTR yp; + const void * xp; + const void * yp; { tree *x = (tree *)xp, *y = (tree *)yp; @@ -6090,7 +6090,7 @@ finish_struct (t, fieldlist, attributes) && TREE_CODE (decl) != TYPE_DECL) { layout_decl (decl, 0); - rest_of_decl_compilation (decl, NULL_PTR, toplevel, 0); + rest_of_decl_compilation (decl, NULL, toplevel, 0); if (! toplevel) expand_decl (decl); --current_binding_level->n_incomplete; diff --git a/gcc/c-lex.c b/gcc/c-lex.c index c6e02dd..f1e1473 100755 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1523,7 +1523,7 @@ yylex () warning ("floating point number exceeds range of `double'"); } - set_float_handler (NULL_PTR); + set_float_handler (NULL); } #ifdef ERANGE /* ERANGE is also reported for underflow, @@ -1750,7 +1750,7 @@ yylex () int max_chars; #ifdef MULTIBYTE_CHARS int longest_char = local_mb_cur_max (); - (void) local_mbtowc (NULL_PTR, NULL_PTR, 0); + (void) local_mbtowc (NULL, NULL, 0); #endif max_chars = TYPE_PRECISION (integer_type_node) / width; @@ -1914,7 +1914,7 @@ yylex () : TYPE_PRECISION (char_type_node); #ifdef MULTIBYTE_CHARS int longest_char = local_mb_cur_max (); - (void) local_mbtowc (NULL_PTR, NULL_PTR, 0); + (void) local_mbtowc (NULL, NULL, 0); #endif c = GETC (); p = token_buffer + 1; diff --git a/gcc/c-parse.c b/gcc/c-parse.c index 36ce680..27b2300 100644 --- a/gcc/c-parse.c +++ b/gcc/c-parse.c @@ -4316,7 +4316,7 @@ yyreduce: that we end every loop we start. */ expand_start_loop (1); emit_line_note (input_filename, lineno); - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ((yyvsp[(4) - (5)].ttype))); position_after_white_space (); ;} break; @@ -4329,7 +4329,7 @@ yyreduce: case 342: { emit_line_note (input_filename, lineno); - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ((yyvsp[(3) - (5)].ttype))); expand_end_loop (); clear_momentary (); ;} @@ -4370,7 +4370,7 @@ yyreduce: /* Emit the end-test, with a line number. */ emit_line_note ((yyvsp[(8) - (10)].filename), (yyvsp[(7) - (10)].lineno)); if ((yyvsp[(6) - (10)].ttype)) - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ((yyvsp[(6) - (10)].ttype))); /* Don't let the tree nodes for $9 be discarded by clear_momentary during the parsing of the next stmt. */ @@ -4426,7 +4426,7 @@ yyreduce: { stmt_count++; emit_line_note ((yyvsp[(-1) - (2)].filename), (yyvsp[(0) - (2)].lineno)); - if (! expand_continue_loop (NULL_PTR)) + if (! expand_continue_loop (NULL)) error ("continue statement not within a loop"); ;} break; diff --git a/gcc/c-parse.in b/gcc/c-parse.in index cbc5376..c9a9cd9 100755 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1930,7 +1930,7 @@ stmt: that we end every loop we start. */ expand_start_loop (1); emit_line_note (input_filename, lineno); - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ($4)); position_after_white_space (); } lineno_labeled_stmt @@ -1938,7 +1938,7 @@ stmt: | do_stmt_start '(' expr ')' ';' { emit_line_note (input_filename, lineno); - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ($3)); expand_end_loop (); clear_momentary (); } @@ -1970,7 +1970,7 @@ stmt: /* Emit the end-test, with a line number. */ emit_line_note ($<filename>8, $<lineno>7); if ($6) - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, truthvalue_conversion ($6)); /* Don't let the tree nodes for $9 be discarded by clear_momentary during the parsing of the next stmt. */ @@ -2011,7 +2011,7 @@ stmt: | CONTINUE ';' { stmt_count++; emit_line_note ($<filename>-1, $<lineno>0); - if (! expand_continue_loop (NULL_PTR)) + if (! expand_continue_loop (NULL)) error ("continue statement not within a loop"); } | RETURN ';' { stmt_count++; diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 0c75dfb..616d7ab 100755 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -6528,7 +6528,7 @@ process_init_element (value) if (constructor_stack->replacement_value != 0) { error_init ("excess elements in struct initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); return; } @@ -6564,7 +6564,7 @@ process_init_element (value) if (constructor_fields == 0) { pedwarn_init ("excess elements in struct initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); break; } @@ -6629,7 +6629,7 @@ process_init_element (value) if (constructor_fields == 0) { pedwarn_init ("excess elements in union initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); break; } @@ -6704,7 +6704,7 @@ process_init_element (value) && tree_int_cst_lt (constructor_max_index, constructor_index)) { pedwarn_init ("excess elements in array initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); break; } @@ -6716,7 +6716,7 @@ process_init_element (value) constructor_range_end)) { pedwarn_init ("excess elements in array initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); TREE_INT_CST_HIGH (constructor_range_end) = TREE_INT_CST_HIGH (constructor_max_index); TREE_INT_CST_LOW (constructor_range_end) @@ -6768,7 +6768,7 @@ process_init_element (value) if (constructor_fields == 0) { pedwarn_init ("excess elements in scalar initializer%s", - " after `%s'", NULL_PTR); + " after `%s'", NULL); break; } diff --git a/gcc/combine.c b/gcc/combine.c index 7268961..e8a202d 100755 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1850,7 +1850,7 @@ try_combine (i3, i2, i1) isn't mentioned in any SETs in NEWPAT that are field assignments. */ if (! combinable_i3pat (NULL_RTX, &newpat, i1dest, NULL_RTX, - 0, NULL_PTR)) + 0, NULL)) { undo_all (); return 0; @@ -2862,7 +2862,7 @@ find_split_point (loc, insn) && GET_CODE (XEXP (SET_SRC (x), 0)) == REG && (pos = exact_log2 (INTVAL (XEXP (SET_SRC (x), 1)))) >= 7 && GET_CODE (SET_DEST (x)) == REG - && (split = find_single_use (SET_DEST (x), insn, NULL_PTR)) != 0 + && (split = find_single_use (SET_DEST (x), insn, NULL)) != 0 && (GET_CODE (*split) == EQ || GET_CODE (*split) == NE) && XEXP (*split, 0) == SET_DEST (x) && XEXP (*split, 1) == const0_rtx) diff --git a/gcc/config/arm/thumb.h b/gcc/config/arm/thumb.h index e38281c..1933489 100755 --- a/gcc/config/arm/thumb.h +++ b/gcc/config/arm/thumb.h @@ -961,7 +961,7 @@ int thumb_shiftable_const (); { \ rtx orig_X = X; \ X = copy_rtx (X); \ - push_reload (orig_X, NULL_RTX, &X, NULL_PTR, \ + push_reload (orig_X, NULL_RTX, &X, NULL, \ BASE_REG_CLASS, \ Pmode, VOIDmode, 0, 0, OPNUM, TYPE); \ goto WIN; \ diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c index 320713a..269bad6 100755 --- a/gcc/cppalloc.c +++ b/gcc/cppalloc.c @@ -35,36 +35,36 @@ memory_full () exit (EXIT_FAILURE); } -PTR +void * xmalloc (size) size_t size; { - register PTR ptr = (PTR) malloc (size); + register void *ptr = malloc (size); if (ptr == 0) memory_full (); return ptr; } -PTR +void * xcalloc (number, size) size_t number, size; { - register PTR ptr = (PTR) calloc (number, size); + register void *ptr = calloc (number, size); if (ptr == 0) memory_full (); return ptr; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (ptr == 0) memory_full (); return ptr; diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 163211e..1f241da 100755 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -420,7 +420,7 @@ cpp_lex (pfile, skip_evaluation) || (num_chars == 1 && token_buffer[0] != '\0')) { wchar_t wc; - (void) mbtowc (NULL_PTR, NULL_PTR, 0); + (void) mbtowc (NULL, NULL, 0); if (mbtowc (& wc, token_buffer, num_chars) == num_chars) result = wc; else diff --git a/gcc/cpplib.c b/gcc/cpplib.c index aafc737..3213913 100755 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1393,7 +1393,7 @@ create_definition (buf, limit, pfile, predefinition) } } /* now everything from bp before limit is the definition. */ - defn = collect_expansion (pfile, bp, limit, -1, NULL_PTR); + defn = collect_expansion (pfile, bp, limit, -1, NULL); defn->args.argnames = (U_CHAR *) ""; } @@ -3524,7 +3524,7 @@ do_if (pfile, keyword) struct directive *keyword ATTRIBUTE_UNUSED; { HOST_WIDE_INT value = eval_if_expression (pfile); - conditional_skip (pfile, value == 0, T_IF, NULL_PTR); + conditional_skip (pfile, value == 0, T_IF, NULL); return 0; } @@ -1008,7 +1008,7 @@ mention_regs (x) { if (GET_CODE (XEXP (x, 0)) == REG && ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 0)))) - if (insert_regs (XEXP (x, 0), NULL_PTR, 0)) + if (insert_regs (XEXP (x, 0), NULL, 0)) { rehash_using_reg (XEXP (x, 0)); changed = 1; @@ -1016,7 +1016,7 @@ mention_regs (x) if (GET_CODE (XEXP (x, 1)) == REG && ! REGNO_QTY_VALID_P (REGNO (XEXP (x, 1)))) - if (insert_regs (XEXP (x, 1), NULL_PTR, 0)) + if (insert_regs (XEXP (x, 1), NULL, 0)) { rehash_using_reg (XEXP (x, 1)); changed = 1; @@ -1093,7 +1093,7 @@ insert_regs (x, classp, modified) { int regno = REGNO (SUBREG_REG (x)); - insert_regs (SUBREG_REG (x), NULL_PTR, 0); + insert_regs (SUBREG_REG (x), NULL, 0); /* Mention_regs checks if REG_TICK is exactly one larger than REG_IN_TABLE to find out if there was only a single preceding invalidation - for the SUBREG - or another one, which would be @@ -1478,7 +1478,7 @@ insert (x, classp, hash, mode) subhash = safe_hash (subexp, mode) % NBUCKETS; subelt = lookup (subexp, subhash, mode); if (subelt == 0) - subelt = insert (subexp, NULL_PTR, subhash, mode); + subelt = insert (subexp, NULL, subhash, mode); /* Initialize SUBELT's circular chain if it has none. */ if (subelt->related_value == 0) subelt->related_value = subelt; @@ -1716,7 +1716,7 @@ remove_invalid_refs (regno) { next = p->next_same_hash; if (GET_CODE (p->exp) != REG - && refers_to_regno_p (regno, regno + 1, p->exp, NULL_PTR)) + && refers_to_regno_p (regno, regno + 1, p->exp, NULL)) remove_from_table (p, i); } } @@ -1747,7 +1747,7 @@ remove_invalid_subreg_refs (regno, word, mode) + (GET_MODE_SIZE (GET_MODE (exp)) - 1) / UNITS_PER_WORD) >= word) && SUBREG_WORD (exp) <= end)) - && refers_to_regno_p (regno, regno + 1, p->exp, NULL_PTR)) + && refers_to_regno_p (regno, regno + 1, p->exp, NULL)) remove_from_table (p, i); } } @@ -3372,7 +3372,7 @@ simplify_unary_operation (code, mode, op, op_mode) } x = CONST_DOUBLE_FROM_REAL_VALUE (d, mode); - set_float_handler (NULL_PTR); + set_float_handler (NULL); return x; } @@ -3406,7 +3406,7 @@ simplify_unary_operation (code, mode, op, op_mode) abort (); } - set_float_handler (NULL_PTR); + set_float_handler (NULL); /* Clear the bits that don't belong in our mode, unless they and our sign bit are all one. @@ -3565,7 +3565,7 @@ simplify_binary_operation (code, mode, op0, op1) #endif value = real_value_truncate (mode, value); - set_float_handler (NULL_PTR); + set_float_handler (NULL); return CONST_DOUBLE_FROM_REAL_VALUE (value, mode); } #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ @@ -3970,7 +3970,7 @@ simplify_binary_operation (code, mode, op0, op1) REAL_VALUE_FROM_CONST_DOUBLE (d, op1); op1is2 = REAL_VALUES_EQUAL (d, dconst2); op1ism1 = REAL_VALUES_EQUAL (d, dconstm1); - set_float_handler (NULL_PTR); + set_float_handler (NULL); /* x*2 is x+x and x*(-1) is -x */ if (op1is2 && GET_MODE (op0) == mode) @@ -4624,7 +4624,7 @@ simplify_relational_operation (code, mode, op0, op1) equal = REAL_VALUES_EQUAL (d0, d1); op0lt = op0ltu = REAL_VALUES_LESS (d0, d1); op1lt = op1ltu = REAL_VALUES_LESS (d1, d0); - set_float_handler (NULL_PTR); + set_float_handler (NULL); } #endif /* not REAL_IS_NOT_DOUBLE, or REAL_ARITHMETIC */ @@ -6125,7 +6125,7 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality) new quantity number. */ if (op0_elt == 0) { - if (insert_regs (op0, NULL_PTR, 0)) + if (insert_regs (op0, NULL, 0)) { rehash_using_reg (op0); op0_hash = HASH (op0, mode); @@ -6137,7 +6137,7 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality) op1_hash = HASH (op1,mode); } - op0_elt = insert (op0, NULL_PTR, op0_hash, mode); + op0_elt = insert (op0, NULL, op0_hash, mode); op0_elt->in_memory = op0_in_memory; op0_elt->in_struct = op0_in_struct; } @@ -6151,13 +6151,13 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality) /* Put OP1 in the hash table so it gets a new quantity number. */ if (op1_elt == 0) { - if (insert_regs (op1, NULL_PTR, 0)) + if (insert_regs (op1, NULL, 0)) { rehash_using_reg (op1); op1_hash = HASH (op1, mode); } - op1_elt = insert (op1, NULL_PTR, op1_hash, mode); + op1_elt = insert (op1, NULL, op1_hash, mode); op1_elt->in_memory = op1_in_memory; op1_elt->in_struct = op1_in_struct; } @@ -6179,26 +6179,26 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality) if (op0_elt == 0) { - if (insert_regs (op0, NULL_PTR, 0)) + if (insert_regs (op0, NULL, 0)) { rehash_using_reg (op0); op0_hash = HASH (op0, mode); } - op0_elt = insert (op0, NULL_PTR, op0_hash, mode); + op0_elt = insert (op0, NULL, op0_hash, mode); op0_elt->in_memory = op0_in_memory; op0_elt->in_struct = op0_in_struct; } if (op1_elt == 0) { - if (insert_regs (op1, NULL_PTR, 0)) + if (insert_regs (op1, NULL, 0)) { rehash_using_reg (op1); op1_hash = HASH (op1, mode); } - op1_elt = insert (op1, NULL_PTR, op1_hash, mode); + op1_elt = insert (op1, NULL, op1_hash, mode); op1_elt->in_memory = op1_in_memory; op1_elt->in_struct = op1_in_struct; } diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index dd6d422..9df7df1 100755 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1493,7 +1493,7 @@ gen_label_rtx () register rtx label; label = gen_rtx_CODE_LABEL (VOIDmode, 0, NULL_RTX, - NULL_RTX, label_num++, NULL_PTR); + NULL_RTX, label_num++, NULL); LABEL_NUSES (label) = 0; return label; diff --git a/gcc/except.c b/gcc/except.c index 1b912b5..8cc166f 100755 --- a/gcc/except.c +++ b/gcc/except.c @@ -1154,7 +1154,7 @@ call_get_eh_context () TREE_PUBLIC (fn) = 1; DECL_ARTIFICIAL (fn) = 1; TREE_READONLY (fn) = 1; - make_decl_rtl (fn, NULL_PTR, 1); + make_decl_rtl (fn, NULL, 1); assemble_external (fn); pop_obstacks (); } @@ -1485,7 +1485,7 @@ expand_eh_region_start_for_decl (decl) } push_eh_entry (&ehstack); - note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_BEG); + note = emit_note (NULL, NOTE_INSN_EH_REGION_BEG); NOTE_BLOCK_NUMBER (note) = CODE_LABEL_NUMBER (ehstack.top->entry->exception_handler_label); if (exceptions_via_longjmp) @@ -1524,7 +1524,7 @@ expand_eh_region_end (handler) entry = pop_eh_entry (&ehstack); - note = emit_note (NULL_PTR, NOTE_INSN_EH_REGION_END); + note = emit_note (NULL, NOTE_INSN_EH_REGION_END); ret = NOTE_BLOCK_NUMBER (note) = CODE_LABEL_NUMBER (entry->exception_handler_label); if (exceptions_via_longjmp == 0 && ! flag_new_exceptions diff --git a/gcc/explow.c b/gcc/explow.c index d126f27..adc902e 100755 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -1422,13 +1422,13 @@ probe_stack_range (first, size) || REGNO (test_addr) < FIRST_PSEUDO_REGISTER) test_addr = force_reg (Pmode, test_addr); - emit_note (NULL_PTR, NOTE_INSN_LOOP_BEG); + emit_note (NULL, NOTE_INSN_LOOP_BEG); emit_jump (test_lab); emit_label (loop_lab); emit_stack_probe (test_addr); - emit_note (NULL_PTR, NOTE_INSN_LOOP_CONT); + emit_note (NULL, NOTE_INSN_LOOP_CONT); #ifdef STACK_GROWS_DOWNWARD #define CMP_OPCODE GTU @@ -1447,7 +1447,7 @@ probe_stack_range (first, size) emit_cmp_insn (test_addr, last_addr, CMP_OPCODE, NULL_RTX, Pmode, 1, 0); emit_jump_insn ((*bcc_gen_fctn[(int) CMP_OPCODE]) (loop_lab)); emit_jump (end_lab); - emit_note (NULL_PTR, NOTE_INSN_LOOP_END); + emit_note (NULL, NOTE_INSN_LOOP_END); emit_label (end_lab); /* If will be doing stupid optimization, show test_addr is still live. */ @@ -1744,7 +1744,7 @@ emit_block_move (x, y, size, align) DECL_EXTERNAL (fn) = 1; TREE_PUBLIC (fn) = 1; DECL_ARTIFICIAL (fn) = 1; - make_decl_rtl (fn, NULL_PTR, 1); + make_decl_rtl (fn, NULL, 1); assemble_external (fn); pop_obstacks (); } @@ -2468,7 +2468,7 @@ clear_storage (object, size, align) DECL_EXTERNAL (fn) = 1; TREE_PUBLIC (fn) = 1; DECL_ARTIFICIAL (fn) = 1; - make_decl_rtl (fn, NULL_PTR, 1); + make_decl_rtl (fn, NULL, 1); assemble_external (fn); pop_obstacks (); } @@ -5896,7 +5896,7 @@ expand_expr (exp, target, tmode, modifier) return const0_rtx; case EXIT_EXPR: - expand_exit_loop_if_false (NULL_PTR, + expand_exit_loop_if_false (NULL, invert_truthvalue (TREE_OPERAND (exp, 0))); return const0_rtx; diff --git a/gcc/final.c b/gcc/final.c index 23a1fe0..5175181 100755 --- a/gcc/final.c +++ b/gcc/final.c @@ -1055,8 +1055,8 @@ asm_insn_count (body) if (GET_CODE (body) == ASM_INPUT) template = XSTR (body, 0); else - template = decode_asm_operands (body, NULL_PTR, NULL_PTR, - NULL_PTR, NULL_PTR); + template = decode_asm_operands (body, NULL, NULL, + NULL, NULL); for ( ; *template; template++) if (IS_ASM_LOGICAL_LINE_SEPARATOR(*template) || *template == '\n') @@ -1492,7 +1492,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) break; #ifdef FINAL_PRESCAN_LABEL - FINAL_PRESCAN_INSN (insn, NULL_PTR, 0); + FINAL_PRESCAN_INSN (insn, NULL, 0); #endif #ifdef DWARF2_DEBUGGING_INFO @@ -1684,8 +1684,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes) } /* Get out the operand values. */ - string = decode_asm_operands (body, ops, NULL_PTR, - NULL_PTR, NULL_PTR); + string = decode_asm_operands (body, ops, NULL, + NULL, NULL); /* Inhibit aborts on what would otherwise be compiler bugs. */ insn_noperands = noperands; this_is_asm_operands = insn; @@ -1627,7 +1627,7 @@ life_analysis_1 (f, nregs) basic_block_new_live_at_end = (regset *)0; basic_block_significant = (regset *)0; - obstack_free (&flow_obstack, NULL_PTR); + obstack_free (&flow_obstack, NULL); } /* Subroutines of life analysis. */ diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 2f954c5..289de73 100755 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -920,7 +920,7 @@ exact_real_inverse (mode, r) { /* Don't do the optimization if there was an arithmetic error. */ fail: - set_float_handler (NULL_PTR); + set_float_handler (NULL); return 0; } set_float_handler (float_error); @@ -963,7 +963,7 @@ fail: #endif /* Output the reciprocal and return success flag. */ - set_float_handler (NULL_PTR); + set_float_handler (NULL); *r = y.d; return 1; } @@ -1566,7 +1566,7 @@ const_binop (code, arg1, arg2, notrunc) t = build_real (TREE_TYPE (arg1), real_value_truncate (TYPE_MODE (TREE_TYPE (arg1)), value)); got_float: - set_float_handler (NULL_PTR); + set_float_handler (NULL); TREE_OVERFLOW (t) = (force_fit_type (t, overflow) @@ -1898,7 +1898,7 @@ fold_convert (t, arg1) t = build_real (type, real_value_truncate (TYPE_MODE (type), TREE_REAL_CST (arg1))); - set_float_handler (NULL_PTR); + set_float_handler (NULL); got_it: TREE_OVERFLOW (t) diff --git a/gcc/function.c b/gcc/function.c index 62783a7..3793702 100755 --- a/gcc/function.c +++ b/gcc/function.c @@ -2119,7 +2119,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements) optimize_bit_field (x, insn, 0); if (GET_CODE (SET_SRC (x)) == SIGN_EXTRACT || GET_CODE (SET_SRC (x)) == ZERO_EXTRACT) - optimize_bit_field (x, insn, NULL_PTR); + optimize_bit_field (x, insn, NULL); /* For a paradoxical SUBREG inside a ZERO_EXTRACT, load the object into a register and then store it back out. */ @@ -5644,7 +5644,7 @@ init_function_start (subr, filename, line) /* Make sure first insn is a note even if we don't want linenums. This makes sure the first insn will never be deleted. Also, final expects a note to appear there. */ - emit_note (NULL_PTR, NOTE_INSN_DELETED); + emit_note (NULL, NOTE_INSN_DELETED); /* Set flags used by final.c. */ if (aggregate_value_p (DECL_RESULT (subr))) @@ -5844,12 +5844,12 @@ expand_function_start (subr, parms_have_cleanups) The move is supposed to make sdb output more accurate. */ /* Indicate the beginning of the function body, as opposed to parm setup. */ - emit_note (NULL_PTR, NOTE_INSN_FUNCTION_BEG); + emit_note (NULL, NOTE_INSN_FUNCTION_BEG); /* If doing stupid allocation, mark parms as born here. */ if (GET_CODE (get_last_insn ()) != NOTE) - emit_note (NULL_PTR, NOTE_INSN_DELETED); + emit_note (NULL, NOTE_INSN_DELETED); parm_birth_insn = get_last_insn (); if (obey_regdecls) @@ -5925,7 +5925,7 @@ expand_function_start (subr, parms_have_cleanups) /* After the display initializations is where the tail-recursion label should go, if we end up needing one. Ensure we have a NOTE here since some things (like trampolines) get placed before this. */ - tail_recursion_reentry = emit_note (NULL_PTR, NOTE_INSN_DELETED); + tail_recursion_reentry = emit_note (NULL, NOTE_INSN_DELETED); /* Evaluate now the sizes of any types declared among the arguments. */ for (tem = nreverse (get_pending_sizes ()); tem; tem = TREE_CHAIN (tem)) @@ -6167,7 +6167,7 @@ expand_function_end (filename, line, end_bindings) /* Mark the end of the function body. If control reaches this insn, the function can drop through without returning a value. */ - emit_note (NULL_PTR, NOTE_INSN_FUNCTION_END); + emit_note (NULL, NOTE_INSN_FUNCTION_END); /* Output a linenumber for the end of the function. SDB depends on this. */ diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h index f3f4d91..1f5b12b 100755 --- a/gcc/gansidecl.h +++ b/gcc/gansidecl.h @@ -25,8 +25,6 @@ Boston, MA 02111-1307, USA. */ #ifndef __GANSIDECL_H__ #define __GANSIDECL_H__ -#include "ansidecl.h" - #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __attribute__(x) #endif @@ -56,10 +54,4 @@ Boston, MA 02111-1307, USA. */ #define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6) #endif /* ATTRIBUTE_PRINTF */ -#define GENERIC_PTR PTR - -#ifndef NULL_PTR -#define NULL_PTR ((PTR) 0) -#endif - #endif /* __GANSIDECL_H__ */ @@ -1100,7 +1100,7 @@ translate_options (argcp, argvp) /* Store the translation as one argv elt or as two. */ if (arg != 0 && strchr (arginfo, 'j') != 0) newv[newindex++] = concat (option_map[j].equivalent, arg, - NULL_PTR); + NULL); else if (arg != 0) { newv[newindex++] = option_map[j].equivalent; @@ -1207,7 +1207,7 @@ struct spec_list }; #define INIT_STATIC_SPEC(NAME,PTR) \ -{ NAME, NULL_PTR, PTR, (struct spec_list *)0, sizeof (NAME)-1, 0 } +{ NAME, NULL, PTR, (struct spec_list *)0, sizeof (NAME)-1, 0 } /* List of statically defined specs */ static struct spec_list static_specs[] = { @@ -1270,7 +1270,7 @@ init_spec () extra_specs = (struct spec_list *) xmalloc (sizeof(struct spec_list) * (sizeof(extra_specs_1)/sizeof(extra_specs_1[0]))); - zero_memory ((PTR) extra_specs, sizeof(struct spec_list) * + zero_memory (extra_specs, sizeof(struct spec_list) * (sizeof(extra_specs_1)/sizeof(extra_specs_1[0]))); for (i = (sizeof(extra_specs_1) / sizeof(extra_specs_1[0])) - 1; i >= 0; i--) @@ -1344,7 +1344,7 @@ set_spec (name, spec) old_spec = *(sl->ptr_spec); *(sl->ptr_spec) = ((spec[0] == '+' && ISSPACE ((unsigned char)spec[1])) - ? concat (old_spec, spec + 1, NULL_PTR) + ? concat (old_spec, spec + 1, NULL) : save_string (spec, strlen (spec))); #ifdef DEBUG_SPECS @@ -2107,7 +2107,7 @@ split_directories (name, ptr_num_dirs) if (p - 1 - q > 0) dirs[num_dirs++] = save_string (q, p - 1 - q); - dirs[num_dirs] = NULL_PTR; + dirs[num_dirs] = NULL; if (ptr_num_dirs) *ptr_num_dirs = num_dirs; @@ -2122,7 +2122,7 @@ free_split_directories (dirs) { int i = 0; - while (dirs[i] != NULL_PTR) + while (dirs[i] != NULL) free (dirs[i++]); free ((char *)dirs); @@ -2225,7 +2225,7 @@ make_relative_prefix (progname, bin_prefix, prefix) free_split_directories (prog_dirs); free_split_directories (bin_dirs); prog_dirs = bin_dirs = (char **)0; - return NULL_PTR; + return NULL; } } @@ -2245,7 +2245,7 @@ make_relative_prefix (progname, bin_prefix, prefix) free_split_directories (prog_dirs); free_split_directories (bin_dirs); free_split_directories (prefix_dirs); - return NULL_PTR; + return NULL; } /* Build up the pathnames in argv[0]. */ @@ -2916,7 +2916,7 @@ process_command (argc, argv) gcc_exec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix, standard_exec_prefix); if (gcc_exec_prefix) - putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL_PTR)); + putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); } /* END CYGNUS LOCAL -- meissner/relative pathnames */ @@ -2936,8 +2936,8 @@ process_command (argc, argv) } set_std_prefix (gcc_exec_prefix, len); - add_prefix (&exec_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL_PTR); - add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL_PTR); + add_prefix (&exec_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL); + add_prefix (&startfile_prefixes, gcc_exec_prefix, "GCC", 0, 0, NULL); } /* COMPILER_PATH and LIBRARY_PATH have values @@ -2956,7 +2956,7 @@ process_command (argc, argv) { strncpy (nstore, startp, endp-startp); if (endp == startp) - strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); + strcpy (nstore, concat (".", dir_separator_str, NULL)); else if (endp[-1] != '/' && endp[-1] != DIR_SEPARATOR) { nstore[endp-startp] = DIR_SEPARATOR; @@ -2964,10 +2964,10 @@ process_command (argc, argv) } else nstore[endp-startp] = 0; - add_prefix (&exec_prefixes, nstore, 0, 0, 0, NULL_PTR); + add_prefix (&exec_prefixes, nstore, 0, 0, 0, NULL); add_prefix (&include_prefixes, - concat (nstore, "include", NULL_PTR), - 0, 0, 0, NULL_PTR); + concat (nstore, "include", NULL), + 0, 0, 0, NULL); if (*endp == 0) break; endp = startp = endp + 1; @@ -2990,7 +2990,7 @@ process_command (argc, argv) { strncpy (nstore, startp, endp-startp); if (endp == startp) - strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); + strcpy (nstore, concat (".", dir_separator_str, NULL)); else if (endp[-1] != '/' && endp[-1] != DIR_SEPARATOR) { nstore[endp-startp] = DIR_SEPARATOR; @@ -2998,8 +2998,8 @@ process_command (argc, argv) } else nstore[endp-startp] = 0; - add_prefix (&startfile_prefixes, nstore, NULL_PTR, - 0, 0, NULL_PTR); + add_prefix (&startfile_prefixes, nstore, NULL, + 0, 0, NULL); if (*endp == 0) break; endp = startp = endp + 1; @@ -3023,7 +3023,7 @@ process_command (argc, argv) { strncpy (nstore, startp, endp-startp); if (endp == startp) - strcpy (nstore, concat (".", dir_separator_str, NULL_PTR)); + strcpy (nstore, concat (".", dir_separator_str, NULL)); else if (endp[-1] != '/' && endp[-1] != DIR_SEPARATOR) { nstore[endp-startp] = DIR_SEPARATOR; @@ -3031,8 +3031,8 @@ process_command (argc, argv) } else nstore[endp-startp] = 0; - add_prefix (&startfile_prefixes, nstore, NULL_PTR, - 0, 0, NULL_PTR); + add_prefix (&startfile_prefixes, nstore, NULL, + 0, 0, NULL); if (*endp == 0) break; endp = startp = endp + 1; @@ -3216,12 +3216,12 @@ process_command (argc, argv) value = argv[++i]; else value = p + 1; - add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B); - add_prefix (&startfile_prefixes, value, NULL_PTR, + add_prefix (&exec_prefixes, value, NULL, 1, 0, &warn_B); + add_prefix (&startfile_prefixes, value, NULL, 1, 0, &warn_B); add_prefix (&include_prefixes, concat (value, "include", - NULL_PTR), - NULL_PTR, 1, 0, NULL_PTR); + NULL), + NULL, 1, 0, NULL); /* As a kludge, if the arg is "[foo/]stageN/", just add "[foo/]include" to the include prefix. */ @@ -3237,15 +3237,15 @@ process_command (argc, argv) || value[len - 1] == DIR_SEPARATOR)) { if (len == 7) - add_prefix (&include_prefixes, "include", NULL_PTR, - 1, 0, NULL_PTR); + add_prefix (&include_prefixes, "include", NULL, + 1, 0, NULL); else { char *string = xmalloc (len + 1); strncpy (string, value, len-7); strcpy (string+len-7, "include"); - add_prefix (&include_prefixes, string, NULL_PTR, - 1, 0, NULL_PTR); + add_prefix (&include_prefixes, string, NULL, + 1, 0, NULL); } } } @@ -3392,7 +3392,7 @@ process_command (argc, argv) 0, 1, warn_std_ptr); tooldir_prefix = concat (tooldir_base_prefix, spec_machine, - dir_separator_str, NULL_PTR); + dir_separator_str, NULL); /* If tooldir is relative, base it on exec_prefixes. A relative tooldir lets us move the installed tree as a unit. @@ -3407,29 +3407,29 @@ process_command (argc, argv) { char *gcc_exec_tooldir_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, tooldir_prefix, NULL_PTR); + spec_version, dir_separator_str, tooldir_prefix, NULL); add_prefix (&exec_prefixes, concat (gcc_exec_tooldir_prefix, "bin", - dir_separator_str, NULL_PTR), - NULL_PTR, 0, 0, NULL_PTR); + dir_separator_str, NULL), + NULL, 0, 0, NULL); add_prefix (&startfile_prefixes, concat (gcc_exec_tooldir_prefix, "lib", - dir_separator_str, NULL_PTR), - NULL_PTR, 0, 0, NULL_PTR); + dir_separator_str, NULL), + NULL, 0, 0, NULL); } tooldir_prefix = concat (standard_exec_prefix, spec_machine, dir_separator_str, spec_version, - dir_separator_str, tooldir_prefix, NULL_PTR); + dir_separator_str, tooldir_prefix, NULL); } add_prefix (&exec_prefixes, - concat (tooldir_prefix, "bin", dir_separator_str, NULL_PTR), - "BINUTILS", 0, 0, NULL_PTR); + concat (tooldir_prefix, "bin", dir_separator_str, NULL), + "BINUTILS", 0, 0, NULL); add_prefix (&startfile_prefixes, - concat (tooldir_prefix, "lib", dir_separator_str, NULL_PTR), - "BINUTILS", 0, 0, NULL_PTR); + concat (tooldir_prefix, "lib", dir_separator_str, NULL), + "BINUTILS", 0, 0, NULL); /* More prefixes are enabled in main, after we read the specs file and determine whether this is cross-compilation or not. */ @@ -3687,7 +3687,7 @@ do_spec (spec) this_is_library_file = 0; input_from_pipe = 0; - value = do_spec_1 (spec, 0, NULL_PTR); + value = do_spec_1 (spec, 0, NULL); /* Force out any unfinished command. If -pipe, this forces out the last command if it ended in `|'. */ @@ -3869,28 +3869,28 @@ do_spec_1 (spec, inswitch, soft_matched_part) strcat (buffer, machine_suffix); if (is_directory (buffer, multilib_dir, 1)) { - do_spec_1 ("-L", 0, NULL_PTR); + do_spec_1 ("-L", 0, NULL); #ifdef SPACE_AFTER_L_OPTION - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); #endif - do_spec_1 (buffer, 1, NULL_PTR); - do_spec_1 (multilib_dir, 1, NULL_PTR); + do_spec_1 (buffer, 1, NULL); + do_spec_1 (multilib_dir, 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } } if (!pl->require_machine_suffix) { if (is_directory (pl->prefix, multilib_dir, 1)) { - do_spec_1 ("-L", 0, NULL_PTR); + do_spec_1 ("-L", 0, NULL); #ifdef SPACE_AFTER_L_OPTION - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); #endif - do_spec_1 (pl->prefix, 1, NULL_PTR); - do_spec_1 (multilib_dir, 1, NULL_PTR); + do_spec_1 (pl->prefix, 1, NULL); + do_spec_1 (multilib_dir, 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } } } @@ -3898,11 +3898,11 @@ do_spec_1 (spec, inswitch, soft_matched_part) { if (is_directory (pl->prefix, machine_suffix, 1)) { - do_spec_1 ("-L", 0, NULL_PTR); + do_spec_1 ("-L", 0, NULL); #ifdef SPACE_AFTER_L_OPTION - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); #endif - do_spec_1 (pl->prefix, 1, NULL_PTR); + do_spec_1 (pl->prefix, 1, NULL); /* Remove slash from machine_suffix. */ if (strlen (machine_suffix) >= bufsize) bufsize = strlen (machine_suffix) * 2 + 1; @@ -3912,18 +3912,18 @@ do_spec_1 (spec, inswitch, soft_matched_part) if (buffer[idx - 1] == '/' || buffer[idx - 1] == DIR_SEPARATOR) buffer[idx - 1] = 0; - do_spec_1 (buffer, 1, NULL_PTR); + do_spec_1 (buffer, 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } } if (!pl->require_machine_suffix) { if (is_directory (pl->prefix, "", 1)) { - do_spec_1 ("-L", 0, NULL_PTR); + do_spec_1 ("-L", 0, NULL); #ifdef SPACE_AFTER_L_OPTION - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); #endif /* Remove slash from pl->prefix. */ if (strlen (pl->prefix) >= bufsize) @@ -3934,9 +3934,9 @@ do_spec_1 (spec, inswitch, soft_matched_part) if (buffer[idx - 1] == '/' || buffer[idx - 1] == DIR_SEPARATOR) buffer[idx - 1] = 0; - do_spec_1 (buffer, 1, NULL_PTR); + do_spec_1 (buffer, 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } } } @@ -4037,20 +4037,20 @@ do_spec_1 (spec, inswitch, soft_matched_part) if (gcc_exec_prefix) { - do_spec_1 ("-iprefix", 1, NULL_PTR); + do_spec_1 ("-iprefix", 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); - do_spec_1 (gcc_exec_prefix, 1, NULL_PTR); - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); + do_spec_1 (gcc_exec_prefix, 1, NULL); + do_spec_1 (" ", 0, NULL); } for (; pl; pl = pl->next) { - do_spec_1 ("-isystem", 1, NULL_PTR); + do_spec_1 ("-isystem", 1, NULL); /* Make this a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); - do_spec_1 (pl->prefix, 1, NULL_PTR); - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); + do_spec_1 (pl->prefix, 1, NULL); + do_spec_1 (" ", 0, NULL); } } break; @@ -4126,9 +4126,9 @@ do_spec_1 (spec, inswitch, soft_matched_part) case 'X': for (i = 0; i < n_linker_options; i++) { - do_spec_1 (linker_options[i], 1, NULL_PTR); + do_spec_1 (linker_options[i], 1, NULL); /* Make each accumulated option a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } break; @@ -4136,9 +4136,9 @@ do_spec_1 (spec, inswitch, soft_matched_part) case 'Y': for (i = 0; i < n_assembler_options; i++) { - do_spec_1 (assembler_options[i], 1, NULL_PTR); + do_spec_1 (assembler_options[i], 1, NULL); /* Make each accumulated option a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } break; @@ -4146,9 +4146,9 @@ do_spec_1 (spec, inswitch, soft_matched_part) case 'Z': for (i = 0; i < n_preprocessor_options; i++) { - do_spec_1 (preprocessor_options[i], 1, NULL_PTR); + do_spec_1 (preprocessor_options[i], 1, NULL); /* Make each accumulated option a separate argument. */ - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); } break; @@ -4156,61 +4156,61 @@ do_spec_1 (spec, inswitch, soft_matched_part) a certain constant string as a spec. */ case '1': - value = do_spec_1 (cc1_spec, 0, NULL_PTR); + value = do_spec_1 (cc1_spec, 0, NULL); if (value != 0) return value; break; case '2': - value = do_spec_1 (cc1plus_spec, 0, NULL_PTR); + value = do_spec_1 (cc1plus_spec, 0, NULL); if (value != 0) return value; break; case 'a': - value = do_spec_1 (asm_spec, 0, NULL_PTR); + value = do_spec_1 (asm_spec, 0, NULL); if (value != 0) return value; break; case 'A': - value = do_spec_1 (asm_final_spec, 0, NULL_PTR); + value = do_spec_1 (asm_final_spec, 0, NULL); if (value != 0) return value; break; case 'c': - value = do_spec_1 (signed_char_spec, 0, NULL_PTR); + value = do_spec_1 (signed_char_spec, 0, NULL); if (value != 0) return value; break; case 'C': - value = do_spec_1 (cpp_spec, 0, NULL_PTR); + value = do_spec_1 (cpp_spec, 0, NULL); if (value != 0) return value; break; case 'E': - value = do_spec_1 (endfile_spec, 0, NULL_PTR); + value = do_spec_1 (endfile_spec, 0, NULL); if (value != 0) return value; break; case 'l': - value = do_spec_1 (link_spec, 0, NULL_PTR); + value = do_spec_1 (link_spec, 0, NULL); if (value != 0) return value; break; case 'L': - value = do_spec_1 (lib_spec, 0, NULL_PTR); + value = do_spec_1 (lib_spec, 0, NULL); if (value != 0) return value; break; case 'G': - value = do_spec_1 (libgcc_spec, 0, NULL_PTR); + value = do_spec_1 (libgcc_spec, 0, NULL); if (value != 0) return value; break; @@ -4239,7 +4239,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) *x = 0; - value = do_spec_1 (buf, 0, NULL_PTR); + value = do_spec_1 (buf, 0, NULL); if (value != 0) return value; } @@ -4358,14 +4358,14 @@ do_spec_1 (spec, inswitch, soft_matched_part) *x = 0; - value = do_spec_1 (buf, 0, NULL_PTR); + value = do_spec_1 (buf, 0, NULL); if (value != 0) return value; } break; case 'S': - value = do_spec_1 (startfile_spec, 0, NULL_PTR); + value = do_spec_1 (startfile_spec, 0, NULL); if (value != 0) return value; break; @@ -4383,8 +4383,8 @@ do_spec_1 (spec, inswitch, soft_matched_part) break; case '*': - do_spec_1 (soft_matched_part, 1, NULL_PTR); - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (soft_matched_part, 1, NULL); + do_spec_1 (" ", 0, NULL); break; /* Process a string found as the value of a spec given by name. @@ -4421,7 +4421,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) { if (c == '(') { - value = do_spec_1 (name, 0, NULL_PTR); + value = do_spec_1 (name, 0, NULL); if (value != 0) return value; } @@ -4460,7 +4460,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) } *x = 0; - value = do_spec_1 (buf, 0, NULL_PTR); + value = do_spec_1 (buf, 0, NULL); if (value != 0) return value; } @@ -4513,7 +4513,7 @@ do_spec_1 (spec, inswitch, soft_matched_part) case '|': if (input_from_pipe) - do_spec_1 ("-", 0, NULL_PTR); + do_spec_1 ("-", 0, NULL); break; default: @@ -4617,7 +4617,7 @@ next_member: abort (); if (negate != found - && do_spec_1 (save_string (body, endbody-body-1), 0, NULL_PTR) < 0) + && do_spec_1 (save_string (body, endbody-body-1), 0, NULL) < 0) return 0; } else if (p[-1] == '*' && p[0] == '}') @@ -4719,7 +4719,7 @@ next_member: else { if (do_spec_1 (save_string (body, endbody - body - 1), - 0, NULL_PTR) < 0) + 0, NULL) < 0) return 0; } } @@ -4727,7 +4727,7 @@ next_member: { /* Here if a %{|...} conditional fails: output a minus sign, which means "standard output" or "standard input". */ - do_spec_1 ("-", 0, NULL_PTR); + do_spec_1 ("-", 0, NULL); return endbody; } } @@ -4834,8 +4834,8 @@ give_switch (switchnum, omit_first_word, include_blanks) { if (!omit_first_word) { - do_spec_1 ("-", 0, NULL_PTR); - do_spec_1 (switches[switchnum].part1, 1, NULL_PTR); + do_spec_1 ("-", 0, NULL); + do_spec_1 (switches[switchnum].part1, 1, NULL); } if (switches[switchnum].args != 0) @@ -4844,12 +4844,12 @@ give_switch (switchnum, omit_first_word, include_blanks) for (p = switches[switchnum].args; *p; p++) { if (include_blanks) - do_spec_1 (" ", 0, NULL_PTR); - do_spec_1 (*p, 1, NULL_PTR); + do_spec_1 (" ", 0, NULL); + do_spec_1 (*p, 1, NULL); } } - do_spec_1 (" ", 0, NULL_PTR); + do_spec_1 (" ", 0, NULL); switches[switchnum].valid = 1; } @@ -4922,11 +4922,11 @@ is_directory (path1, path2, linker) if (linker && ((cp - path == 6 && strcmp (path, concat (dir_separator_str, "lib", - dir_separator_str, ".", NULL_PTR)) == 0) + dir_separator_str, ".", NULL)) == 0) || (cp - path == 10 && strcmp (path, concat (dir_separator_str, "usr", dir_separator_str, "lib", - dir_separator_str, ".", NULL_PTR)) == 0))) + dir_separator_str, ".", NULL)) == 0))) return 0; return (stat (path, &st) >= 0 && S_ISDIR (st.st_mode)); @@ -5098,8 +5098,8 @@ main (argc, argv) /* Read specs from a file if there is one. */ machine_suffix = concat (spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL_PTR); - just_machine_suffix = concat (spec_machine, dir_separator_str, NULL_PTR); + spec_version, dir_separator_str, NULL); + just_machine_suffix = concat (spec_machine, dir_separator_str, NULL); specs_file = find_a_file (&startfile_prefixes, "specs", R_OK); /* Read the specs file unless it is a default one. */ @@ -5135,18 +5135,18 @@ main (argc, argv) if (*cross_compile == '0') { #ifdef MD_EXEC_PREFIX - add_prefix (&exec_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR); - add_prefix (&startfile_prefixes, md_exec_prefix, "GCC", 0, 0, NULL_PTR); + add_prefix (&exec_prefixes, md_exec_prefix, "GCC", 0, 0, NULL); + add_prefix (&startfile_prefixes, md_exec_prefix, "GCC", 0, 0, NULL); #endif #ifdef MD_STARTFILE_PREFIX add_prefix (&startfile_prefixes, md_startfile_prefix, "GCC", - 0, 0, NULL_PTR); + 0, 0, NULL); #endif #ifdef MD_STARTFILE_PREFIX_1 add_prefix (&startfile_prefixes, md_startfile_prefix_1, "GCC", - 0, 0, NULL_PTR); + 0, 0, NULL); #endif /* If standard_startfile_prefix is relative, base it on @@ -5164,27 +5164,27 @@ main (argc, argv) #endif ) add_prefix (&startfile_prefixes, standard_startfile_prefix, "BINUTILS", - 0, 0, NULL_PTR); + 0, 0, NULL); else { if (gcc_exec_prefix) add_prefix (&startfile_prefixes, concat (gcc_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), - NULL_PTR, 0, 0, NULL_PTR); + standard_startfile_prefix, NULL), + NULL, 0, 0, NULL); add_prefix (&startfile_prefixes, concat (standard_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), - NULL_PTR, 0, 0, NULL_PTR); + standard_startfile_prefix, NULL), + NULL, 0, 0, NULL); } add_prefix (&startfile_prefixes, standard_startfile_prefix_1, - "BINUTILS", 0, 0, NULL_PTR); + "BINUTILS", 0, 0, NULL); add_prefix (&startfile_prefixes, standard_startfile_prefix_2, - "BINUTILS", 0, 0, NULL_PTR); + "BINUTILS", 0, 0, NULL); #if 0 /* Can cause surprises, and one can use -B./ instead. */ - add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR); + add_prefix (&startfile_prefixes, "./", NULL, 0, 1, NULL); #endif } else @@ -5192,8 +5192,8 @@ main (argc, argv) if (*standard_startfile_prefix != DIR_SEPARATOR && gcc_exec_prefix) add_prefix (&startfile_prefixes, concat (gcc_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), - "BINUTILS", 0, 0, NULL_PTR); + standard_startfile_prefix, NULL), + "BINUTILS", 0, 0, NULL); } /* If we have a GCC_EXEC_PREFIX envvar, modify it for cpp's sake. */ @@ -5524,7 +5524,7 @@ lookup_compiler (name, length, language) language = cp->spec[0] + 1; new = (struct compiler *) xmalloc (sizeof (struct compiler)); new->suffix = cp->suffix; - copy_memory ((char *) lookup_compiler (NULL_PTR, 0, language)->spec, + copy_memory ((char *) lookup_compiler (NULL, 0, language)->spec, (char *) new->spec, sizeof new->spec); return new; } @@ -5537,26 +5537,26 @@ lookup_compiler (name, length, language) return 0; } -PTR +void * xmalloc (size) size_t size; { - register PTR value = (PTR) malloc (size); + register void *value = malloc (size); if (value == 0) fatal ("virtual memory exhausted"); return value; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (ptr == 0) fatal ("virtual memory exhausted"); return ptr; @@ -803,7 +803,7 @@ gcse_main (f, file) } /* Free our obstack. */ - obstack_free (&gcse_obstack, NULL_PTR); + obstack_free (&gcse_obstack, NULL); /* Free reg_set_table. */ free_reg_set_mem (); /* Free storage used to record predecessor/successor data. */ @@ -842,7 +842,7 @@ compute_can_copy () #else reg = gen_rtx (REG, (enum machine_mode) i, LAST_VIRTUAL_REGISTER + 1); insn = emit_insn (gen_rtx (SET, VOIDmode, reg, reg)); - if (recog (PATTERN (insn), insn, NULL_PTR) >= 0) + if (recog (PATTERN (insn), insn, NULL) >= 0) can_copy_p[i] = 1; #endif break; @@ -1094,7 +1094,7 @@ static void free_reg_set_mem () { free (reg_set_table); - obstack_free (®_set_obstack, NULL_PTR); + obstack_free (®_set_obstack, NULL); } /* Record REGNO in the reg_set table. */ diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index 56a08e5..fd0e5be 100755 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -5733,26 +5733,26 @@ extend_range (range, min, max) if (range->max < max) range->max = max; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); diff --git a/gcc/gencodes.c b/gcc/gencodes.c index d3d45c5..0002965 100755 --- a/gcc/gencodes.c +++ b/gcc/gencodes.c @@ -56,27 +56,27 @@ gen_insn (insn) insn_code_number); } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genconfig.c b/gcc/genconfig.c index 9b05247..51d8363 100755 --- a/gcc/genconfig.c +++ b/gcc/genconfig.c @@ -268,11 +268,11 @@ gen_peephole (peep) walk_insn_part (XVECEXP (peep, 0, i), 1, 0); } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); @@ -280,16 +280,16 @@ xmalloc (size) return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genemit.c b/gcc/genemit.c index 0a4e925..833f68a 100755 --- a/gcc/genemit.c +++ b/gcc/genemit.c @@ -678,11 +678,11 @@ output_init_mov_optab () #endif } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); @@ -690,16 +690,16 @@ xmalloc (size) return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genextract.c b/gcc/genextract.c index a0a6992..08b4327 100755 --- a/gcc/genextract.c +++ b/gcc/genextract.c @@ -346,27 +346,27 @@ print_path (path) } } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genflags.c b/gcc/genflags.c index 97cd734..6c5d5f8 100755 --- a/gcc/genflags.c +++ b/gcc/genflags.c @@ -175,11 +175,11 @@ gen_insn (insn) obstack_grow (obstack_ptr, &insn, sizeof (rtx)); } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); @@ -187,16 +187,16 @@ xmalloc (size) return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index 02cf8d3..21b1cc7 100755 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -275,11 +275,11 @@ gencode (f) } #if defined(USE_C_ALLOCA) -PTR +void * xmalloc (nbytes) size_t nbytes; { - register PTR tmp = (PTR) malloc (nbytes); + register void *tmp = malloc (nbytes); if (!tmp) { diff --git a/gcc/genopinit.c b/gcc/genopinit.c index 907d04f..75b3706 100755 --- a/gcc/genopinit.c +++ b/gcc/genopinit.c @@ -283,11 +283,11 @@ gen_insn (insn) printf (";\n"); } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); @@ -295,16 +295,16 @@ xmalloc (size) return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genoutput.c b/gcc/genoutput.c index dfac50a..e3eb74e 100755 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -904,27 +904,27 @@ gen_split (split) d->outfun = 0; } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genpeep.c b/gcc/genpeep.c index 661bddf..612fd90 100755 --- a/gcc/genpeep.c +++ b/gcc/genpeep.c @@ -107,7 +107,7 @@ gen_peephole (peep) /* Walk the insn's pattern, remembering at all times the path down to the walking point. */ - match_rtx (XVECEXP (peep, 0, i), NULL_PTR, insn_code_number); + match_rtx (XVECEXP (peep, 0, i), NULL, insn_code_number); } /* We get this far if the pattern matches. @@ -384,27 +384,27 @@ print_code (code) } } -PTR +void * xmalloc (size) size_t size; { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); return val; } -PTR +void * xrealloc (old, size) - PTR old; + void *old; size_t size; { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; diff --git a/gcc/genrecog.c b/gcc/genrecog.c index c892fe1..2b67391 100755 --- a/gcc/genrecog.c +++ b/gcc/genrecog.c @@ -955,7 +955,7 @@ merge_trees(struct decision_head oldh, struct decision_head addh) abort (); if (old == 0 - && position_merit (NULL_PTR, add_mode, add->code) < best_merit) + && position_merit (NULL, add_mode, add->code) < best_merit) { add->prev = 0; add->next = oldh.first; @@ -1039,7 +1039,7 @@ write_subroutine(struct decision *tree, enum routine_type type) printf ("x%d ATTRIBUTE_UNUSED;\n", max_depth); printf (" %s tem ATTRIBUTE_UNUSED;\n", type == SPLIT ? "rtx" : "int"); - write_tree (tree, "", NULL_PTR, 1, type); + write_tree (tree, "", NULL, 1, type); printf (" ret0: return %d;\n}\n\n", type == SPLIT ? 0 : -1); } /* This table is used to indent the recog_* functions when we are inside @@ -1646,23 +1646,23 @@ mybcopy(char *in, char *out, unsigned length) *out++ = *in++; } -PTR -xrealloc(PTR old, size_t size) +void * +xrealloc(void *old, size_t size) { - register PTR ptr; + register void *ptr; if (old) - ptr = (PTR) realloc (old, size); + ptr = realloc (old, size); else - ptr = (PTR) malloc (size); + ptr = malloc (size); if (!ptr) fatal ("virtual memory exhausted"); return ptr; } -PTR +void * xmalloc(size_t size) { - register PTR val = (PTR) malloc (size); + register void *val = malloc (size); if (val == 0) fatal ("virtual memory exhausted"); diff --git a/gcc/global.c b/gcc/global.c index 076440f..d6a0526 100755 --- a/gcc/global.c +++ b/gcc/global.c @@ -263,7 +263,7 @@ static int n_regs_set; static HARD_REG_SET eliminable_regset; -static int allocno_compare (const GENERIC_PTR, const GENERIC_PTR); +static int allocno_compare (const void *, const void *); static void global_conflicts (void); static void expand_preferences (void); static void prune_preferences (void); @@ -603,8 +603,8 @@ global_alloc (FILE *file) static int allocno_compare (v1p, v2p) - const GENERIC_PTR v1p; - const GENERIC_PTR v2p; + const void * v1p; + const void * v2p; { int v1 = *(int *)v1p, v2 = *(int *)v2p; register int pri1; @@ -59,7 +59,7 @@ hash_table_init_n (table, newfunc, hash, comp, size) error ("no memory"); return false; } - memset ((PTR) table->table, 0, alloc); + memset (table->table, 0, alloc); table->size = size; table->newfunc = newfunc; table->hash = hash; @@ -87,7 +87,7 @@ void hash_table_free (table) struct hash_table *table; { - obstack_free (&table->memory, (PTR) NULL); + obstack_free (&table->memory, NULL); } /* Look up KEY in TABLE. If CREATE is non-NULL a new entry is @@ -150,12 +150,12 @@ hash_newfunc (entry, table, p) /* Allocate space in a hash table. */ -PTR +void * hash_allocate (table, size) struct hash_table *table; unsigned int size; { - PTR ret; + void *ret; ret = obstack_alloc (&table->memory, size); if (ret == NULL && size != 0) @@ -169,7 +169,7 @@ void hash_traverse (table, func, info) struct hash_table *table; boolean (*func) (struct hash_entry *, hash_table_key); - PTR info; + void *info; { unsigned int i; @@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */ typedef enum {false, true} boolean; -typedef PTR hash_table_key; +typedef void *hash_table_key; /* Hash table routines. There is no way to free up a hash table. */ @@ -107,7 +107,7 @@ extern struct hash_entry *hash_newfunc hash_table_key key); /* Grab some space for a hash table entry. */ -extern PTR hash_allocate (struct hash_table *, +extern void *hash_allocate (struct hash_table *, unsigned int); /* Traverse a hash table in a random order, calling a function on each diff --git a/gcc/integrate.c b/gcc/integrate.c index de2d238..484bf8c 100755 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1578,7 +1578,7 @@ expand_inline_function (fndecl, parms, target, ignore, type, insn that can be used as an insertion point. */ map->insns_at_start = get_last_insn (); if (map->insns_at_start == 0) - map->insns_at_start = emit_note (NULL_PTR, NOTE_INSN_DELETED); + map->insns_at_start = emit_note (NULL, NOTE_INSN_DELETED); map->regno_pointer_flag = INLINE_REGNO_POINTER_FLAG (header); map->regno_pointer_align = INLINE_REGNO_POINTER_ALIGN (header); @@ -2241,7 +2241,7 @@ delete_noop_moves (f) { rtx trial; rtx tem = find_equiv_reg (NULL_RTX, insn, 0, - sreg, NULL_PTR, dreg, + sreg, NULL, dreg, GET_MODE (SET_SRC (body))); if (tem != 0 @@ -2279,7 +2279,7 @@ delete_noop_moves (f) } else if (dreg >= 0 && CONSTANT_P (SET_SRC (body)) && find_equiv_reg (SET_SRC (body), insn, 0, dreg, - NULL_PTR, 0, + NULL, 0, GET_MODE (SET_DEST (body)))) { /* This handles the case where we have two consecutive diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c index 066bff4..d4b45f0 100755 --- a/gcc/local-alloc.c +++ b/gcc/local-alloc.c @@ -247,9 +247,9 @@ static void update_equiv_regs (void); static void no_equiv (rtx, rtx); static void block_alloc (int); static int qty_sugg_compare (int, int); -static int qty_sugg_compare_1 (const GENERIC_PTR, const GENERIC_PTR); +static int qty_sugg_compare_1 (const void *, const void *); static int qty_compare (int, int); -static int qty_compare_1 (const GENERIC_PTR, const GENERIC_PTR); +static int qty_compare_1 (const void *, const void *); static int combine_regs (rtx, rtx, int, int, rtx, int); static int reg_meets_class_p (int, enum reg_class); static void update_qty_class (int, int); @@ -1445,8 +1445,8 @@ qty_compare (q1, q2) static int qty_compare_1 (q1p, q2p) - const GENERIC_PTR q1p; - const GENERIC_PTR q2p; + const void * q1p; + const void * q2p; { register int q1 = *(int *)q1p, q2 = *(int *)q2p; register int tem = QTY_CMP_PRI (q2) - QTY_CMP_PRI (q1); @@ -1485,8 +1485,8 @@ qty_sugg_compare (q1, q2) static int qty_sugg_compare_1 (q1p, q2p) - const GENERIC_PTR q1p; - const GENERIC_PTR q2p; + const void * q1p; + const void * q2p; { register int q1 = *(int *)q1p, q2 = *(int *)q2p; register int tem = QTY_CMP_SUGG (q1) - QTY_CMP_SUGG (q2); @@ -4349,7 +4349,7 @@ strength_reduce (scan_start, end, loop_top, insn_count, p = last_consec_insn; record_giv (v, p, src_reg, dest_reg, mult_val, add_val, benefit, - DEST_REG, not_every_iteration, NULL_PTR, loop_start, + DEST_REG, not_every_iteration, NULL, loop_start, loop_end); } @@ -8838,7 +8838,7 @@ rtx get_condition_for_loop (x) rtx x; { - rtx comparison = get_condition (x, NULL_PTR); + rtx comparison = get_condition (x, NULL); if (comparison == 0 || ! invariant_p (XEXP (comparison, 0)) diff --git a/gcc/prefix.c b/gcc/prefix.c index 0281a32..613bdb7 100755 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -95,7 +95,7 @@ get_key_value (key) #endif if (prefix == 0) - prefix = getenv (temp = concat (key, "_ROOT", NULL_PTR)); + prefix = getenv (temp = concat (key, "_ROOT", NULL)); if (prefix == 0) prefix = std_prefix; @@ -270,7 +270,7 @@ translate_name (name) prefix = temp; } - return concat (prefix, name, NULL_PTR); + return concat (prefix, name, NULL); } /* Update PATH using KEY if PATH starts with PREFIX. */ @@ -283,9 +283,9 @@ update_path (path, key) if (! strncmp (path, std_prefix, strlen (std_prefix)) && key != 0) { if (key[0] != '$') - key = concat ("@", key, NULL_PTR); + key = concat ("@", key, NULL); - path = concat (key, &path[strlen (std_prefix)], NULL_PTR); + path = concat (key, &path[strlen (std_prefix)], NULL); while (path[0] == '@' || path[0] == '$') path = translate_name (path); diff --git a/gcc/recog.c b/gcc/recog.c index f22ef3d..41e4db3 100755 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -150,7 +150,7 @@ recog_memoized (insn) rtx insn; { if (INSN_CODE (insn) < 0) - INSN_CODE (insn) = recog (PATTERN (insn), insn, NULL_PTR); + INSN_CODE (insn) = recog (PATTERN (insn), insn, NULL); return INSN_CODE (insn); } @@ -171,7 +171,7 @@ check_asm_operands (x) return 1; operands = (rtx *) alloca (noperands * sizeof (rtx)); - decode_asm_operands (x, operands, NULL_PTR, NULL_PTR, NULL_PTR); + decode_asm_operands (x, operands, NULL, NULL, NULL); for (i = 0; i < noperands; i++) if (!general_operand (operands[i], VOIDmode)) diff --git a/gcc/regmove.c b/gcc/regmove.c index 244ba06..020df98 100755 --- a/gcc/regmove.c +++ b/gcc/regmove.c @@ -69,8 +69,8 @@ static void rel_build_chain (struct rel_use *, struct rel_use *, int); static void rel_record_mem (rtx *, rtx, int, int, int, rtx, int, int); static void invalidate_related (rtx, int); static void find_related (rtx *, rtx, int, int); -static int chain_starts_earlier (const GENERIC_PTR, const GENERIC_PTR); -static int chain_ends_later (const GENERIC_PTR, const GENERIC_PTR); +static int chain_starts_earlier (const void *, const void *); +static int chain_ends_later (const void *, const void *); static struct related *optimize_related_values_1 (struct related *, int, int, rtx, FILE *); static void optimize_related_values_0 (struct related *, int, int, @@ -421,7 +421,7 @@ rel_build_chain (new_use, match, base) new_chain->chain = new_use; new_use->prev_chain_ref = &new_chain->chain; new_use->next_chain = 0; - new_use->next_chain = NULL_PTR; + new_use->next_chain = NULL; new_chain->linked = 0; new_chain->prev = regno_related[base]->baseinfo->chains; regno_related[base]->baseinfo->chains = new_chain; @@ -506,20 +506,20 @@ rel_record_mem (addrp, addr, size, pre_offs, post_offs, insn, luid, call_tally) if (HAVE_PRE_INCREMENT && match) { PUT_CODE (auto_inc, PRE_INC); - if (recog (PATTERN (insn), insn, NULL_PTR) >= 0) + if (recog (PATTERN (insn), insn, NULL) >= 0) break; } match = lookup_related (regno, class, offset + size); if (HAVE_PRE_DECREMENT && match) { PUT_CODE (auto_inc, PRE_DEC); - if (recog (PATTERN (insn), insn, NULL_PTR) >= 0) + if (recog (PATTERN (insn), insn, NULL) >= 0) break; } match = 0; } PUT_CODE (auto_inc, POST_INC); - if (HAVE_POST_INCREMENT && recog (PATTERN (insn), insn, NULL_PTR) >= 0) + if (HAVE_POST_INCREMENT && recog (PATTERN (insn), insn, NULL) >= 0) { struct rel_use *inc_use; @@ -527,14 +527,14 @@ rel_record_mem (addrp, addr, size, pre_offs, post_offs, insn, luid, call_tally) *inc_use = *new_use; inc_use->sibling = new_use; new_use->sibling = inc_use; - inc_use->prev_chain_ref = NULL_PTR; - inc_use->next_chain = NULL_PTR; + inc_use->prev_chain_ref = NULL; + inc_use->next_chain = NULL; hash = REL_USE_HASH (inc_use->match_offset = offset + size); inc_use->next_hash = regno_related[base]->baseinfo->hashtab[hash]; regno_related[base]->baseinfo->hashtab[hash] = inc_use; } PUT_CODE (auto_inc, POST_DEC); - if (HAVE_POST_DECREMENT && recog (PATTERN (insn), insn, NULL_PTR) >= 0) + if (HAVE_POST_DECREMENT && recog (PATTERN (insn), insn, NULL) >= 0) { struct rel_use *dec_use; @@ -542,8 +542,8 @@ rel_record_mem (addrp, addr, size, pre_offs, post_offs, insn, luid, call_tally) *dec_use = *new_use; dec_use->sibling = new_use->sibling; new_use->sibling = dec_use; - dec_use->prev_chain_ref = NULL_PTR; - dec_use->next_chain = NULL_PTR; + dec_use->prev_chain_ref = NULL; + dec_use->next_chain = NULL; hash = REL_USE_HASH (dec_use->match_offset = offset + size); dec_use->next_hash = regno_related[base]->baseinfo->hashtab[hash]; regno_related[base]->baseinfo->hashtab[hash] = dec_use; @@ -962,8 +962,8 @@ find_related (xp, insn, luid, call_tally) /* Comparison functions for qsort. */ static int chain_starts_earlier (chain1, chain2) - const GENERIC_PTR chain1; - const GENERIC_PTR chain2; + const void * chain1; + const void * chain2; { int d = ((*(struct rel_use_chain **)chain2)->start_luid - (*(struct rel_use_chain **)chain1)->start_luid); @@ -988,8 +988,8 @@ chain_starts_earlier (chain1, chain2) static int chain_ends_later (chain1, chain2) - const GENERIC_PTR chain1; - const GENERIC_PTR chain2; + const void * chain1; + const void * chain2; { int d = ((*(struct rel_use_chain **)chain1)->end_luid - (*(struct rel_use_chain **)chain2)->end_luid); diff --git a/gcc/reload.c b/gcc/reload.c index 7c0122e..86a8d93 100755 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -861,7 +861,7 @@ push_reload (in, out, inloc, outloc, class, order as the reloads. Thus if the outer reload is also of type RELOAD_OTHER, we are guaranteed that this inner reload will be output before the outer reload. */ - push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), NULL_PTR, + push_reload (SUBREG_REG (in), NULL_RTX, &SUBREG_REG (in), NULL, find_valid_class (inmode, SUBREG_WORD (in)), VOIDmode, VOIDmode, 0, 0, opnum, type); dont_remove_subreg = 1; @@ -1756,7 +1756,7 @@ find_dummy_reload (real_in, real_out, inloc, outloc, register int regno = REGNO (in) + in_offset; int nwords = HARD_REGNO_NREGS (regno, inmode); - if (! refers_to_regno_for_reload_p (regno, regno + nwords, out, NULL_PTR) + if (! refers_to_regno_for_reload_p (regno, regno + nwords, out, NULL) && ! hard_reg_set_here_p (regno, regno + nwords, PATTERN (this_insn)) && (! earlyclobber @@ -2150,7 +2150,7 @@ immune_p (x, y, ydata) struct decomposition xdata; if (ydata.reg_flag) - return !refers_to_regno_for_reload_p (ydata.start, ydata.end, x, NULL_PTR); + return !refers_to_regno_for_reload_p (ydata.start, ydata.end, x, NULL); if (ydata.safe) return 1; @@ -2422,7 +2422,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ; else if (constraints[i][0] == 'p') { - find_reloads_address (VOIDmode, NULL_PTR, + find_reloads_address (VOIDmode, NULL, recog_operand[i], recog_operand_loc[i], i, operand_type[i], ind_levels, insn); @@ -3438,7 +3438,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) { operand_reloadnum[i] = push_reload (XEXP (recog_operand[i], 0), NULL_RTX, - &XEXP (recog_operand[i], 0), NULL_PTR, + &XEXP (recog_operand[i], 0), NULL, MODE_BASE_REG_CLASS (VOIDmode), GET_MODE (XEXP (recog_operand[i], 0)), VOIDmode, 0, 0, i, RELOAD_FOR_INPUT); @@ -4043,7 +4043,7 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) if (insn_code_number >= 0) if (insn_operand_address_p[insn_code_number][i]) - find_reloads_address (VOIDmode, NULL_PTR, + find_reloads_address (VOIDmode, NULL, recog_operand[i], recog_operand_loc[i], i, RELOAD_FOR_INPUT, ind_levels, insn); @@ -4368,7 +4368,7 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn) tem = make_memloc (ad, regno); if (! strict_memory_address_p (GET_MODE (tem), XEXP (tem, 0))) { - find_reloads_address (GET_MODE (tem), NULL_PTR, XEXP (tem, 0), + find_reloads_address (GET_MODE (tem), NULL, XEXP (tem, 0), &XEXP (tem, 0), opnum, ADDR_TYPE (type), ind_levels, insn); } @@ -4412,7 +4412,7 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn) return 0; /* If we do not have one of the cases above, we must do the reload. */ - push_reload (ad, NULL_RTX, loc, NULL_PTR, MODE_BASE_REG_CLASS (mode), + push_reload (ad, NULL_RTX, loc, NULL, MODE_BASE_REG_CLASS (mode), GET_MODE (ad), VOIDmode, 0, 0, opnum, type); return 1; } @@ -4500,7 +4500,7 @@ find_reloads_address (mode, memrefloc, ad, loc, opnum, type, ind_levels, insn) { /* Must use TEM here, not AD, since it is the one that will have any subexpressions reloaded, if needed. */ - push_reload (tem, NULL_RTX, loc, NULL_PTR, + push_reload (tem, NULL_RTX, loc, NULL, MODE_BASE_REG_CLASS (mode), GET_MODE (tem), VOIDmode, 0, 0, opnum, type); @@ -5081,7 +5081,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) else { reloadnum - = push_reload (x, NULL_RTX, loc, NULL_PTR, + = push_reload (x, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), GET_MODE (x), 0, 0, @@ -5128,7 +5128,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) XEXP (XEXP (x, 0), 0), &XEXP (XEXP (x, 0), 0), opnum, type, ind_levels, insn); - reloadnum = push_reload (x, NULL_RTX, loc, NULL_PTR, + reloadnum = push_reload (x, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); @@ -5158,7 +5158,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) find_reloads_address (GET_MODE (x), loc, XEXP (x, 0), &XEXP (x, 0), opnum, ADDR_TYPE (type), ind_levels, insn); - push_reload (*loc, NULL_RTX, loc, NULL_PTR, + push_reload (*loc, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); return 1; @@ -5180,7 +5180,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) that feeds this insn. */ if (reg_equiv_mem[regno] != 0) { - push_reload (reg_equiv_mem[regno], NULL_RTX, loc, NULL_PTR, + push_reload (reg_equiv_mem[regno], NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); @@ -5209,7 +5209,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) || !(context ? REGNO_OK_FOR_INDEX_P (regno) : REGNO_MODE_OK_FOR_BASE_P (regno, mode)))) { - push_reload (x, NULL_RTX, loc, NULL_PTR, + push_reload (x, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); @@ -5222,7 +5222,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) from before this insn to after it. */ if (regno_clobbered_p (regno, this_insn)) { - push_reload (x, NULL_RTX, loc, NULL_PTR, + push_reload (x, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); @@ -5244,7 +5244,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) if (! (context ? REGNO_OK_FOR_INDEX_P (regno) : REGNO_MODE_OK_FOR_BASE_P (regno, mode))) { - push_reload (x, NULL_RTX, loc, NULL_PTR, + push_reload (x, NULL_RTX, loc, NULL, (context ? INDEX_REG_CLASS : MODE_BASE_REG_CLASS (mode)), GET_MODE (x), VOIDmode, 0, 0, opnum, type); @@ -5262,7 +5262,7 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn) { x = find_reloads_subreg_address (x, 0, opnum, type, ind_levels, insn); - push_reload (x, NULL_RTX, loc, NULL_PTR, class, + push_reload (x, NULL_RTX, loc, NULL, class, GET_MODE (x), VOIDmode, 0, 0, opnum, type); return 1; } @@ -5354,7 +5354,7 @@ find_reloads_address_part (x, loc, class, mode, opnum, type, ind_levels) opnum, type, ind_levels, 0); } - push_reload (x, NULL_RTX, loc, NULL_PTR, class, + push_reload (x, NULL_RTX, loc, NULL, class, mode, VOIDmode, 0, 0, opnum, type); } @@ -5638,7 +5638,7 @@ refers_to_regno_for_reload_p (regno, endregno, x, loc) if (reg_equiv_memory_loc[i]) return refers_to_regno_for_reload_p (regno, endregno, reg_equiv_memory_loc[i], - NULL_PTR); + NULL); if (reg_equiv_constant[i]) return 0; @@ -5781,7 +5781,7 @@ reg_overlap_mentioned_for_reload_p (x, in) endregno = regno + (regno < FIRST_PSEUDO_REGISTER ? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1); - return refers_to_regno_for_reload_p (regno, endregno, in, NULL_PTR); + return refers_to_regno_for_reload_p (regno, endregno, in, NULL); } /* Return nonzero if anything in X contains a MEM. Look also for pseudo @@ -6024,7 +6024,7 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) && refers_to_regno_for_reload_p (valueno, (valueno + HARD_REGNO_NREGS (valueno, mode)), - goal, NULL_PTR)) + goal, NULL)) return 0; /* Reject registers that overlap GOAL. */ diff --git a/gcc/reload1.c b/gcc/reload1.c index b32c3f4..3110412 100755 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -394,12 +394,12 @@ static void spill_hard_reg (int, FILE *, int); static int finish_spills (int, FILE *); static void ior_hard_reg_set (HARD_REG_SET *, HARD_REG_SET *); static void scan_paradoxical_subregs (rtx); -static int hard_reg_use_compare (const GENERIC_PTR, const GENERIC_PTR); +static int hard_reg_use_compare (const void *, const void *); static void count_pseudo (struct hard_reg_n_uses *, int); static void order_regs_for_reload (struct insn_chain *); static void reload_as_needed (int); static void forget_old_reloads_1 (rtx, rtx); -static int reload_reg_class_lower (const GENERIC_PTR, const GENERIC_PTR); +static int reload_reg_class_lower (const void *, const void *); static void mark_reload_reg_in_use (int, int, enum reload_type, enum machine_mode); static void clear_reload_reg_in_use (int, int, enum reload_type, @@ -583,7 +583,7 @@ reload (first, global, dumpfile) /* The two pointers used to track the true location of the memory used for label offsets. */ - char *real_known_ptr = NULL_PTR; + char *real_known_ptr = NULL; int (*real_at_ptr)[NUM_ELIMINABLE_REGS]; /* Make sure even insns with volatile mem refs are recognizable. */ @@ -595,7 +595,7 @@ reload (first, global, dumpfile) /* Make sure that the last insn in the chain is not something that needs reloading. */ - emit_note (NULL_PTR, NOTE_INSN_DELETED); + emit_note (NULL, NOTE_INSN_DELETED); /* Enable find_equiv_reg to distinguish insns made by reload. */ reload_first_uid = get_max_uid (); @@ -3453,7 +3453,7 @@ init_elim_table () { reg_eliminate = (struct elim_table *) xmalloc(sizeof(struct elim_table) * NUM_ELIMINABLE_REGS); - zero_memory ((PTR) reg_eliminate, + zero_memory (reg_eliminate, sizeof(struct elim_table) * NUM_ELIMINABLE_REGS); } @@ -3741,8 +3741,8 @@ scan_paradoxical_subregs (x) static int hard_reg_use_compare (p1p, p2p) - const GENERIC_PTR p1p; - const GENERIC_PTR p2p; + const void * p1p; + const void * p2p; { struct hard_reg_n_uses *p1 = (struct hard_reg_n_uses *)p1p; struct hard_reg_n_uses *p2 = (struct hard_reg_n_uses *)p2p; @@ -4205,8 +4205,8 @@ static int reload_nregs[MAX_RELOADS]; static int reload_reg_class_lower (r1p, r2p) - const GENERIC_PTR r1p; - const GENERIC_PTR r2p; + const void * r1p; + const void * r2p; { register int r1 = *(short *)r1p, r2 = *(short *)r2p; register int t; @@ -5685,7 +5685,7 @@ choose_reload_regs (chain) { register rtx equiv = find_equiv_reg (reload_in[r], insn, reload_reg_class[r], - -1, NULL_PTR, 0, reload_mode[r]); + -1, NULL, 0, reload_mode[r]); int regno; if (equiv != 0) @@ -6272,7 +6272,7 @@ emit_reload_insns (chain) oldequiv = find_equiv_reg (old, insn, reload_reg_class[reload_secondary_in_reload[j]], - -1, NULL_PTR, 0, mode); + -1, NULL, 0, mode); #endif /* If reloading from memory, see if there is a register @@ -6289,7 +6289,7 @@ emit_reload_insns (chain) && REGNO (old) >= FIRST_PSEUDO_REGISTER && reg_renumber[REGNO (old)] < 0))) oldequiv = find_equiv_reg (old, insn, ALL_REGS, - -1, NULL_PTR, 0, mode); + -1, NULL, 0, mode); if (oldequiv) { @@ -8128,7 +8128,7 @@ reload_cse_invalidate_regno (regno, mode, clobber) for (x = reg_values[i]; x; x = XEXP (x, 1)) { if (XEXP (x, 0) != 0 - && refers_to_regno_p (regno, endregno, XEXP (x, 0), NULL_PTR)) + && refers_to_regno_p (regno, endregno, XEXP (x, 0), NULL)) { /* If this is the only entry on the list, clear reg_values[i]. Otherwise, just clear this entry on @@ -8161,7 +8161,7 @@ reload_cse_invalidate_regno (regno, mode, clobber) PUT_MODE (invalidate_regno_rtx, GET_MODE (x)); REGNO (invalidate_regno_rtx) = i; if (refers_to_regno_p (regno, endregno, invalidate_regno_rtx, - NULL_PTR)) + NULL)) { reload_cse_invalidate_regno (i, VOIDmode, 1); break; diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index bb1d648..b064ed7 100755 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -960,7 +960,7 @@ reg_overlap_mentioned_p (x, in) endregno = regno + (regno < FIRST_PSEUDO_REGISTER ? HARD_REGNO_NREGS (regno, GET_MODE (x)) : 1); - return refers_to_regno_p (regno, endregno, in, NULL_PTR); + return refers_to_regno_p (regno, endregno, in, NULL); } /* Used for communications between the next few functions. */ @@ -908,9 +908,9 @@ expand_fixup (tree_label, rtl_label, last_insn) start_sequence (); pushlevel (0); - start = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG); - fixup->before_jump = emit_note (NULL_PTR, NOTE_INSN_DELETED); - last_block_end_note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_END); + start = emit_note (NULL, NOTE_INSN_BLOCK_BEG); + fixup->before_jump = emit_note (NULL, NOTE_INSN_DELETED); + last_block_end_note = emit_note (NULL, NOTE_INSN_BLOCK_END); fixup->context = poplevel (1, 0, 0); /* Create the BLOCK node now! */ end_sequence (); emit_insns_after (start, original_before_jump); @@ -940,7 +940,7 @@ void expand_fixups (first_insn) rtx first_insn; { - fixup_gotos (NULL_PTR, NULL_RTX, NULL_TREE, first_insn, 0); + fixup_gotos (NULL, NULL_RTX, NULL_TREE, first_insn, 0); } /* When exiting a binding contour, process all pending gotos requiring fixups. @@ -1973,7 +1973,7 @@ expand_start_loop (exit_flag) do_pending_stack_adjust (); emit_queue (); - emit_note (NULL_PTR, NOTE_INSN_LOOP_BEG); + emit_note (NULL, NOTE_INSN_LOOP_BEG); emit_label (thisloop->data.loop.start_label); return thisloop; @@ -2000,7 +2000,7 @@ void expand_loop_continue_here () { do_pending_stack_adjust (); - emit_note (NULL_PTR, NOTE_INSN_LOOP_CONT); + emit_note (NULL, NOTE_INSN_LOOP_CONT); emit_label (loop_stack->data.loop.continue_label); } @@ -2234,7 +2234,7 @@ expand_end_loop () } emit_jump (start_label); - emit_note (NULL_PTR, NOTE_INSN_LOOP_END); + emit_note (NULL, NOTE_INSN_LOOP_END); emit_label (loop_stack->data.loop.end_label); POPSTACK (loop_stack); @@ -2828,7 +2828,7 @@ expand_start_bindings (exit_flag) int exit_flag; { struct nesting *thisblock = ALLOC_NESTING (); - rtx note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG); + rtx note = emit_note (NULL, NOTE_INSN_BLOCK_BEG); /* Make an entry on block_stack for the block we are entering. */ @@ -3248,7 +3248,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) just going out of scope, so they are in scope for their cleanups. */ if (mark_ends) - last_block_end_note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_END); + last_block_end_note = emit_note (NULL, NOTE_INSN_BLOCK_END); else /* Get rid of the beginning-mark if we don't make an end-mark. */ NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED; @@ -3984,7 +3984,7 @@ expand_start_case (exit_flag, expr, type, printname) /* Make sure case_stmt.start points to something that won't need any transformation before expand_end_case. */ if (GET_CODE (get_last_insn ()) != NOTE) - emit_note (NULL_PTR, NOTE_INSN_DELETED); + emit_note (NULL, NOTE_INSN_DELETED); thiscase->data.case_stmt.start = get_last_insn (); @@ -5023,7 +5023,7 @@ expand_end_case (orig_index) = (TREE_CODE (TREE_TYPE (orig_index)) != ENUMERAL_TYPE && estimate_case_costs (thiscase->data.case_stmt.case_list)); balance_case_nodes (&thiscase->data.case_stmt.case_list, - NULL_PTR); + NULL); emit_case_nodes (index, thiscase->data.case_stmt.case_list, default_label, index_type); emit_jump_if_reachable (default_label); diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 2f8fec8..fac444c 100755 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -119,7 +119,7 @@ variable_size (size) if (immediate_size_expand) /* NULL_RTX is not defined; neither is the rtx type. Also, we would like to pass const0_rtx here, but don't have it. */ - expand_expr (size, expand_expr (integer_zero_node, NULL_PTR, VOIDmode, 0), + expand_expr (size, expand_expr (integer_zero_node, NULL, VOIDmode, 0), VOIDmode, 0); else pending_sizes = tree_cons (NULL_TREE, size, pending_sizes); diff --git a/gcc/stupid.c b/gcc/stupid.c index c81894d..bf8b7b3 100755 --- a/gcc/stupid.c +++ b/gcc/stupid.c @@ -123,7 +123,7 @@ static HARD_REG_SET *after_insn_hard_regs; #define MARK_LIVE_AFTER(INSN,REGNO) \ SET_HARD_REG_BIT (after_insn_hard_regs[INSN_SUID (INSN)], (REGNO)) -static int stupid_reg_compare (const GENERIC_PTR,const GENERIC_PTR); +static int stupid_reg_compare (const void *,const void *); static int stupid_find_reg (int, enum reg_class, enum machine_mode, int, int, int); static void stupid_mark_refs (rtx, struct insn_chain *); @@ -455,8 +455,8 @@ stupid_life_analysis (f, nregs, file) static int stupid_reg_compare (r1p, r2p) - const GENERIC_PTR r1p; - const GENERIC_PTR r2p; + const void * r1p; + const void * r2p; { register int r1 = *(int *)r1p, r2 = *(int *)r2p; register int len1 = reg_where_dead[r1] - REG_WHERE_BORN (r1); diff --git a/gcc/toplev.c b/gcc/toplev.c index 167a8d0..5b7a4dc 100755 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1898,16 +1898,16 @@ botch (s) /* Same as `malloc' but report error if no memory available. */ -PTR +void * xmalloc (size) size_t size; { - register PTR value; + register void *value; if (size == 0) size = 1; - value = (PTR) malloc (size); + value = malloc (size); if (value == 0) fatal ("virtual memory exhausted"); return value; @@ -1915,16 +1915,16 @@ xmalloc (size) /* Same as `calloc' but report error if no memory available. */ -PTR +void * xcalloc (size1, size2) size_t size1, size2; { - register PTR value; + register void *value; if (size1 == 0 || size2 == 0) size1 = size2 = 1; - value = (PTR) calloc (size1, size2); + value = calloc (size1, size2); if (value == 0) fatal ("virtual memory exhausted"); return value; @@ -1934,17 +1934,17 @@ xcalloc (size1, size2) /* Same as `realloc' but report error if no memory available. Also handle null PTR even if the vendor realloc gets it wrong. */ -PTR +void * xrealloc (ptr, size) - PTR ptr; + void *ptr; size_t size; { - register PTR result; + register void *result; if (size == 0) size = 1; - result = (ptr ? (PTR) realloc (ptr, size) : (PTR) malloc (size)); + result = (ptr ? realloc (ptr, size) : malloc (size)); if (!result) fatal ("virtual memory exhausted"); @@ -2654,7 +2654,7 @@ compile_file (name) || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) { reconsider = 1; - rest_of_decl_compilation (decl, NULL_PTR, 1, 1); + rest_of_decl_compilation (decl, NULL, 1, 1); } if (TREE_CODE (decl) == FUNCTION_DECL @@ -46,7 +46,7 @@ Boston, MA 02111-1307, USA. */ #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free /* obstack.[ch] explicitly declined to prototype this. */ -extern int _obstack_allocated_p (struct obstack *h, GENERIC_PTR obj); +extern int _obstack_allocated_p (struct obstack *h, void * obj); /* Tree nodes of permanent duration are allocated in this obstack. They are the identifier nodes, and everything outside of @@ -1482,7 +1482,7 @@ build_real_from_int_cst (type, i) /* Check for valid float value for this type on this target machine. */ got_it: - set_float_handler (NULL_PTR); + set_float_handler (NULL); #ifdef CHECK_FLOAT_VALUE CHECK_FLOAT_VALUE (TYPE_MODE (type), d, overflow); diff --git a/gcc/varasm.c b/gcc/varasm.c index bbc23e6..f1ab488 100755 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1818,7 +1818,7 @@ assemble_real (d, mode) abort (); } - set_float_handler (NULL_PTR); + set_float_handler (NULL); } /* Here we combine duplicate floating constants to make diff --git a/gcc/varray.h b/gcc/varray.h index d540345..bfbc3a8 100755 --- a/gcc/varray.h +++ b/gcc/varray.h @@ -42,7 +42,7 @@ typedef union varray_data_tag { unsigned long ul[1]; HOST_WIDE_INT hint[1]; unsigned HOST_WIDE_INT uhint[1]; - GENERIC_PTR generic[1]; + void * generic[1]; char *cptr[1]; struct rtx_def *rtx[1]; struct rtvec_def *rtvec[1]; @@ -95,7 +95,7 @@ extern varray_type varray_init (size_t, size_t, const char *); va = varray_init (num, sizeof (unsigned HOST_WIDE_INT), name) #define VARRAY_GENERIC_PTR_INIT(va, num, name) \ - va = varray_init (num, sizeof (GENERIC_PTR), name) + va = varray_init (num, sizeof (void *), name) #define VARRAY_CHAR_PTR_INIT(va, num, name) \ va = varray_init (num, sizeof (char *), name) |