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:
parent
84e884e906
commit
7ad9ff7a2b
12
gcc/gcc.c
12
gcc/gcc.c
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user