gcc.c (main): Handle blank in version_string when comparing with compiler_version.

* gcc.c (main): Handle blank in version_string when comparing
	with compiler_version.

From-SVN: r14414
This commit is contained in:
Doug Evans 1997-07-13 16:21:56 +00:00
parent 84e884e906
commit 7ad9ff7a2b

View File

@ -4533,7 +4533,17 @@ main (argc, argv)
if (verbose_flag)
{
if (! strcmp (version_string, compiler_version))
int n;
/* compiler_version is truncated at the first space when initialized
from version string, so truncate version_string at the first space
before comparing. */
for (n = 0; version_string[n]; n++)
if (version_string[n] == ' ')
break;
if (! strncmp (version_string, compiler_version, n)
&& compiler_version[n] == 0)
fprintf (stderr, "gcc version %s\n", version_string);
else
fprintf (stderr, "gcc driver version %s executing gcc version %s\n",