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: [PATCH] Fix -b option handling (PR driver/38381)


Jakub Jelinek <jakub@redhat.com> writes:

> 2008-12-27  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR driver/38381
> 	* gcc.c (process_command): Accept also -b with configuration name
> 	in the next argument.
> 	* doc/invoke.texi (-b): Document that no hyphen is required if
> 	configuration name is in the next argument after -b.


>    if (argc > 1 && argv[1][0] == '-'
> -      && (argv[1][1] == 'V' ||
> -	 ((argv[1][1] == 'b') && (NULL != strchr(argv[1] + 2,'-')))))
> +      && (argv[1][1] == 'V'
> +	  || (argv[1][1] == 'b'
> +	      && (argv[1][2] == '\0'
> +		  || NULL != strchr(argv[1] + 2,'-')))))

Please add a space before '(' and a space before '-'.

> -	     && (argv[1][1] == 'V' ||
> -		((argv[1][1] == 'b') && ( NULL != strchr(argv[1] + 2,'-')))))
> +	     && (argv[1][1] == 'V'
> +		 || (argv[1][1] == 'b'
> +		     && (argv[1][2] == '\0'
> +			 || NULL != strchr(argv[1] + 2,'-')))))

Same here.

OK with those changes.

Thanks.

Ian


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