home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / bugs / 34 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.3 KB  |  45 lines

  1. Newsgroups: comp.sys.sgi.bugs
  2. Path: sparky!uunet!news.univie.ac.at!chx400!bernina!hoesel
  3. From: hoesel@igc.ethz.ch (Frans van Hoesel)
  4. Subject: c-compiler false diagnostic.
  5. Message-ID: <1992Dec23.163608.24772@bernina.ethz.ch>
  6. Sender: news@bernina.ethz.ch (USENET News System)
  7. Organization: University of Groningen, the Netherlands
  8. Date: Wed, 23 Dec 1992 16:36:08 GMT
  9. Lines: 34
  10.  
  11. Hi ,
  12.  
  13. the c compiler on my indigo (4.0.1) gives the following warning on the
  14. following program.
  15. #include <stdio.h>
  16.  
  17. int main() {
  18.  
  19.         int i;
  20.         int p[] = { 1,2,3,4,5};
  21.         for (i = 0; i<5; i++ ) printf("%d ", p[i]);
  22.         ;
  23.         return 0;
  24. }
  25.  
  26. > cc -fullwarn -ansi t4.c
  27. accom: Warning 302: t4.c, line 8: bodyless for statement
  28.         ;
  29.        -^
  30.  
  31. This seems incorrect to me. (the warning I got was the result from some
  32. huge preprocessor macro, not this little program above. It costed me
  33. quite some time to discover that everything was ok, besides the warning
  34. itself).
  35.  
  36. A - in my case - related question: is there a maximum length for the
  37. replacement of a macro (can I have a macro with a body of say 10000
  38. characters)?
  39. -- frans
  40.  
  41. -- 
  42. --    ==============================================================    --
  43. ----  ===  frans van hoesel             hoesel@igc.ethz.ch       ===  ----
  44. --    ==============================================================    --
  45.