From: ghazi Date: Sun, 29 Apr 2001 12:43:20 +0000 (+0000) Subject: * c-aux-info.c: NULL_PTR->NULL in calls to `concat'. X-Git-Tag: upstream/4.9.2~94685 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e2023c802501ffbadccd034f0a339d39a71d451;p=platform%2Fupstream%2Flinaro-gcc.git * c-aux-info.c: NULL_PTR->NULL in calls to `concat'. * gcc.c: Likewise. * prefix.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41675 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3327ea4..a93fa93 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2001-04-29 Kaveh R. Ghazi + + * c-aux-info.c: NULL_PTR->NULL in calls to `concat'. + + * gcc.c: Likewise. + + * prefix.c: Likewise. + 2001-04-28 Stan Shebs * objc/objc-act.c (handle_class_ref): Rewrite to flush target diff --git a/gcc/c-aux-info.c b/gcc/c-aux-info.c index f3b375f..8cff76e 100644 --- a/gcc/c-aux-info.c +++ b/gcc/c-aux-info.c @@ -92,13 +92,13 @@ affix_data_type (param) 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 @@ -125,13 +125,13 @@ gen_formal_list_for_type (fntype, style) const 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); } @@ -180,10 +180,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 @@ -242,23 +242,23 @@ gen_formal_list_for_func_def (fndecl, style) const 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; } @@ -320,14 +320,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); @@ -335,17 +335,17 @@ gen_type (ret_val, t, style) case ARRAY_TYPE: if (!COMPLETE_TYPE_P (t) || 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; @@ -353,7 +353,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; @@ -382,13 +382,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: @@ -401,13 +401,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: @@ -420,14 +420,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: @@ -439,7 +439,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: @@ -459,11 +459,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; } @@ -505,9 +505,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 = ""; @@ -526,7 +526,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 @@ -543,11 +543,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/gcc.c b/gcc/gcc.c index 9c137fa..298bbce 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1058,7 +1058,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; @@ -1505,7 +1505,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) : xstrdup (spec)); #ifdef DEBUG_SPECS @@ -3030,7 +3030,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)); } #endif @@ -3072,7 +3072,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 (!IS_DIR_SEPARATOR (endp[-1])) { nstore[endp - startp] = DIR_SEPARATOR; @@ -3083,7 +3083,7 @@ process_command (argc, argv) add_prefix (&exec_prefixes, nstore, 0, PREFIX_PRIORITY_LAST, 0, NULL_PTR); add_prefix (&include_prefixes, - concat (nstore, "include", NULL_PTR), + concat (nstore, "include", NULL), 0, PREFIX_PRIORITY_LAST, 0, NULL_PTR); if (*endp == 0) break; @@ -3107,7 +3107,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 (!IS_DIR_SEPARATOR (endp[-1])) { nstore[endp - startp] = DIR_SEPARATOR; @@ -3140,7 +3140,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 (!IS_DIR_SEPARATOR (endp[-1])) { nstore[endp - startp] = DIR_SEPARATOR; @@ -3390,8 +3390,7 @@ process_command (argc, argv) PREFIX_PRIORITY_B_OPT, 0, &warn_B); add_prefix (&startfile_prefixes, value, NULL_PTR, PREFIX_PRIORITY_B_OPT, 0, &warn_B); - add_prefix (&include_prefixes, concat (value, "include", - NULL_PTR), + add_prefix (&include_prefixes, concat (value, "include", NULL), NULL_PTR, PREFIX_PRIORITY_B_OPT, 0, NULL_PTR); n_switches++; @@ -3579,7 +3578,7 @@ process_command (argc, argv) PREFIX_PRIORITY_LAST, 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. @@ -3594,28 +3593,28 @@ 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), + dir_separator_str, NULL), NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); add_prefix (&startfile_prefixes, concat (gcc_exec_tooldir_prefix, "lib", - dir_separator_str, NULL_PTR), + dir_separator_str, NULL), NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); } 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), + concat (tooldir_prefix, "bin", dir_separator_str, NULL), "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); add_prefix (&startfile_prefixes, - concat (tooldir_prefix, "lib", dir_separator_str, NULL_PTR), + concat (tooldir_prefix, "lib", dir_separator_str, NULL), "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); /* More prefixes are enabled in main, after we read the specs file @@ -3740,7 +3739,7 @@ process_command (argc, argv) { /* POSIX allows separation of -l and the lib arg; canonicalize by concatenating -l with its arg */ infiles[n_infiles].language = "*"; - infiles[n_infiles++].name = concat ("-l", argv[++i], NULL_PTR); + infiles[n_infiles++].name = concat ("-l", argv[++i], NULL); } else if (strncmp (argv[i], "-l", 2) == 0) { @@ -5374,11 +5373,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)); @@ -5617,8 +5616,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. */ @@ -5670,12 +5669,12 @@ main (argc, argv) if (gcc_exec_prefix) add_prefix (&startfile_prefixes, concat (gcc_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), + standard_startfile_prefix, NULL), NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); add_prefix (&startfile_prefixes, concat (standard_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), + standard_startfile_prefix, NULL), NULL_PTR, PREFIX_PRIORITY_LAST, 0, NULL_PTR); } @@ -5694,7 +5693,7 @@ main (argc, argv) && gcc_exec_prefix) add_prefix (&startfile_prefixes, concat (gcc_exec_prefix, machine_suffix, - standard_startfile_prefix, NULL_PTR), + standard_startfile_prefix, NULL), "BINUTILS", PREFIX_PRIORITY_LAST, 0, NULL_PTR); } diff --git a/gcc/prefix.c b/gcc/prefix.c index c43e578..7cb2e7b 100644 --- a/gcc/prefix.c +++ b/gcc/prefix.c @@ -96,7 +96,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; @@ -273,7 +273,7 @@ translate_name (name) and intended by the user, causing two path components to run together. */ - return concat (prefix, name, NULL_PTR); + return concat (prefix, name, NULL); } /* Update PATH using KEY if PATH starts with PREFIX. */ @@ -286,9 +286,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);