home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / gcc / bug / 3137 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.1 KB  |  51 lines

  1. Newsgroups: gnu.gcc.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!analog.COM!alex.ZAtsman
  3. From: alex.ZAtsman@analog.COM (Alex Zatsman)
  4. Subject: Re:  Unending Warnings about '-Wid-clash-..'
  5. Message-ID: <9301072116.AA07990@saturn.spd.analog.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Thu, 7 Jan 1993 21:16:06 GMT
  10. Approved: bug-gcc@prep.ai.mit.edu
  11. Lines: 38
  12.  
  13. Earlier I wrote:
  14.  
  15.     Calling "gcc -Wid-clash-LEN <file name>" sends cc1 into infinite loop
  16.     in which it prints 
  17.  
  18.         cc1: error: Invalid option `-Wid-clash-LEN'
  19.  
  20.     on each iteration. The bad code is in toplev.c (line 2848):
  21.  
  22.               while (*endp)
  23.                 {
  24. ....
  25.  
  26.  
  27. The fix in that message was not good enough -- cc1 still issued id
  28. clash warnings for length 0. A better fix is:
  29.  
  30.  
  31.           warn_id_clash = 1;
  32.           while (*endp)
  33.             {
  34.               if (*endp >= '0' && *endp <= '9')
  35.             endp++;
  36.               else
  37.               {
  38.               error ("Invalid option `%s'", argv[i]);
  39.               warn_id_clash = 0;
  40.               break;
  41.               }
  42.             }
  43.           id_clash_len = atoi (str + 10);
  44.  
  45.  
  46. Sorry for bad fix.
  47.  
  48. Alex Zatsman.
  49. Analog Devices, Inc.
  50.  
  51.