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

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!src.honeywell.com!tap
  3. From: tap@src.honeywell.com (Thomas A Peterson)
  4. Subject: indent produces warnings
  5. Message-ID: <9301061908.AA13372@aristotle.src.honeywell.com>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Wed, 6 Jan 1993 19:08:44 GMT
  10. Approved: bug-gnu-utils@prep.ai.mit.edu
  11. Lines: 46
  12.  
  13. Program : indent
  14. Version: 1.6
  15. Machine: SPARCstation IPX
  16. OS: SunOS4.1.1
  17. Description:
  18.  
  19.   The following chunk of code causes indent to produce warnings.
  20.  
  21.    aristotle: cc -c indent_fail.c
  22.    aristotle: indent indent_fail.c
  23.    indent_fail.c: 6: Unbalanced parens
  24.    indent_fail.c: 6: Extra )
  25.    indent_fail.c: 17: Unbalanced parens
  26.    indent_fail.c: 17: Extra )
  27.    aristotle: 
  28.  
  29.   NOTE: I have no idea why C allows me to place a complete declaration
  30.         in a cast expression but it does.
  31.  
  32.  
  33. /* indent_fails.c */
  34.  
  35. void main()
  36. {
  37.   int a, j;
  38.  
  39.   j =1;
  40.   a = (enum colors {red1, white1}) 1;
  41.   {
  42.    enum colors color;
  43.    color = white1;
  44.  }
  45. }
  46.  
  47. void main1()
  48. {
  49.   int a;
  50.  
  51.   a = (int) (struct help { int a;} *) 1;
  52.   {
  53.     typedef struct help help_t;
  54.     help_t trash;
  55.     trash.a = 14;
  56.  }
  57. }
  58.  
  59.