Deleted Added
full compact
gcc.c (107594) gcc.c (110024)
1/* Compiler driver program that can handle many languages.
2 Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free

--- 8 unchanged lines hidden (view full) ---

17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA.
21
22This paragraph is here to try to keep Sun CC from dying.
23The number of chars here seems crucial!!!! */
24
1/* Compiler driver program that can handle many languages.
2 Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free

--- 8 unchanged lines hidden (view full) ---

17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA.
21
22This paragraph is here to try to keep Sun CC from dying.
23The number of chars here seems crucial!!!! */
24
25/* $FreeBSD: head/contrib/gcc/gcc.c 107594 2002-12-04 15:57:11Z obrien $ */
25/* $FreeBSD: head/contrib/gcc/gcc.c 110024 2003-01-29 05:16:58Z obrien $ */
26
27/* This program is the user interface to the C compiler and possibly to
28other compilers. It is used because compilation is a complicated procedure
29which involves running several programs and passing temporary files between
30them, forwarding the users switches to those programs selectively,
31and deleting the temporary files at the end.
32
33CC recognizes how to compile each input file by suffixes in the file names.

--- 3329 unchanged lines hidden (view full) ---

3363
3364 /* Options specified as if they appeared on the command line. */
3365 temp = getenv ("GCC_OPTIONS");
3366 if ((temp) && (strlen (temp) > 0))
3367 {
3368 int len;
3369 int optc = 1;
3370 int new_argc;
26
27/* This program is the user interface to the C compiler and possibly to
28other compilers. It is used because compilation is a complicated procedure
29which involves running several programs and passing temporary files between
30them, forwarding the users switches to those programs selectively,
31and deleting the temporary files at the end.
32
33CC recognizes how to compile each input file by suffixes in the file names.

--- 3329 unchanged lines hidden (view full) ---

3363
3364 /* Options specified as if they appeared on the command line. */
3365 temp = getenv ("GCC_OPTIONS");
3366 if ((temp) && (strlen (temp) > 0))
3367 {
3368 int len;
3369 int optc = 1;
3370 int new_argc;
3371 char **new_argv;
3371 const char **new_argv;
3372 char *envopts;
3373
3374 while (isspace (*temp))
3375 temp++;
3376 len = strlen (temp);
3377 envopts = (char *) xmalloc (len + 1);
3378 strcpy (envopts, temp);
3379
3380 for (i = 0; i < (len - 1); i++)
3381 if ((isspace (envopts[i])) && ! (isspace (envopts[i+1])))
3382 optc++;
3383
3372 char *envopts;
3373
3374 while (isspace (*temp))
3375 temp++;
3376 len = strlen (temp);
3377 envopts = (char *) xmalloc (len + 1);
3378 strcpy (envopts, temp);
3379
3380 for (i = 0; i < (len - 1); i++)
3381 if ((isspace (envopts[i])) && ! (isspace (envopts[i+1])))
3382 optc++;
3383
3384 new_argv = (char **) alloca ((optc + argc) * sizeof(char *));
3384 new_argv = (const char **) alloca ((optc + argc) * sizeof(char *));
3385
3386 for (i = 0, new_argc = 1; new_argc <= optc; new_argc++)
3387 {
3388 while (isspace (envopts[i]))
3389 i++;
3390 new_argv[new_argc] = envopts + i;
3391 while (!isspace (envopts[i]) && (envopts[i] != '\0'))
3392 i++;

--- 3849 unchanged lines hidden ---
3385
3386 for (i = 0, new_argc = 1; new_argc <= optc; new_argc++)
3387 {
3388 while (isspace (envopts[i]))
3389 i++;
3390 new_argv[new_argc] = envopts + i;
3391 while (!isspace (envopts[i]) && (envopts[i] != '\0'))
3392 i++;

--- 3849 unchanged lines hidden ---