This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] PR/9394


Hi,

Devang Patel <dpatel at apple dot com> writes:

> Index: cp/g++spec.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/g++spec.c,v
> retrieving revision 1.35
> diff -Idpatel.pbxuser -c -3 -p -r1.35 g++spec.c
> *** cp/g++spec.c	10 Jan 2003 02:22:16 -0000	1.35
> --- cp/g++spec.c	8 Mar 2003 00:56:51 -0000
> *************** lang_specific_driver (in_argc, in_argv, 
> *** 189,194 ****
> --- 189,196 ----
>   	  else if (strcmp (argv[i], "-static-libgcc") == 0 
>   		   || strcmp (argv[i], "-static") == 0)
>   	    shared_libgcc = 0;
> + 	  else if (DEFAULT_WORD_SWITCH_TAKES_ARG (&argv[i][1]))
> + 	    i++;
>   	  else
>   	    /* Pass other options through.  */
>   	    continue;

That doesn't match the rest of the code.  I think this check a couple
of lines before is where it should go in:

	  else if (((argv[i][2] == '\0'
		     && (char *)strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
		    || strcmp (argv[i], "-Xlinker") == 0
		    || strcmp (argv[i], "-Tdata") == 0))
	    quote = argv[i];
	  else if ((argv[i][2] == '\0'

Something like

  if ((argv[i][2] == '\0' 
       && (DEFAULT_SWITCH_TAKES_ARG (argv[i][1]) || argv[i][1] == 'Y'))
      || DEFAULT_WORD_SWITCH_TAKES_ARG (&argv[i][1]))
   quote = argv[i];

(The 'Y' letter check should probably move to gcc.h, or if it is
unused, skip it.)

- Hari
-- 
Raja R Harinath ------------------------------ harinath at cs dot umn dot edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]