bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gas 2.10.90 bug on -v option


From: tracy . kuhrt
Subject: gas 2.10.90 bug on -v option
Date: Thu, 28 Sep 2000 15:51:46 GMT

When specifying a -v option, gas will print out the version of the
assembler and then hang.  Following is the command-line (and output)
that causes the problem:

$ /usr/bin/as.exe -v
GNU assembler version 2.10.90 (i686-pc-cygwin) using BFD version 2.10.90
<...hang...>

In looking at as.c in function parse_args, it appears that a break
statement was added to the case 'v' option that should not have been.
The next line says /* FALLTHRU */.  Following is a code snippet.  I
commented out the break in my version of the code, recompiled, and it
seems to work fine.

...
        default:
          /* md_parse_option should return 1 if it recognizes optc,
             0 if not.  */
          if (md_parse_option (optc, optarg) != 0)
            break;
          /* `-v' isn't included in the general short_opts list, so
check for
             it explicity here before deciding we've gotten a bad
argument.  */
          if (optc == 'v')
            {
#ifdef VMS
              /* Telling getopt to treat -v's value as optional can
result
                 in it picking up a following filename argument here.
The
                 VMS code in md_parse_option can return 0 in that case,
                 but it has no way of pushing the filename argument
back.  */
              if (optarg && *optarg)
                new_argv[new_argc++] = optarg,  new_argv[new_argc] =
NULL;
              else
#else
              case 'v':
#endif
              case OPTION_VERBOSE:
                print_version_id ();
/* TAK -- commented out
                break;
 */
            }
          /*FALLTHRU*/

        case '?':
          exit (EXIT_FAILURE);

...


Sent via Deja.com http://www.deja.com/
Before you buy.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]