home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20245 < prev    next >
Encoding:
Internet Message Format  |  1993-01-27  |  1.2 KB

  1. Xref: sparky comp.lang.c:20245 comp.lang.c++:19937
  2. Newsgroups: comp.lang.c,comp.lang.c++
  3. Path: sparky!uunet!ukma!gatech!concert!decwrl!borland.com!pete
  4. From: pete@borland.com (Pete Becker)
  5. Subject: Re: C/C++ Correctness (was: Re: C/C++ Speed)
  6. Message-ID: <1993Jan27.234010.13363@borland.com>
  7. Originator: pete@genghis.borland.com
  8. Sender: news@borland.com (News Admin)
  9. Organization: Borland International
  10. References: <1jic36INNhn5@emx.cc.utexas.edu> <1993Jan20.185607.2938@borland.com> <1k6m67INNgqv@emx.cc.utexas.edu>
  11. Date: Wed, 27 Jan 1993 23:40:10 GMT
  12. Lines: 20
  13.  
  14. In article <1k6m67INNgqv@emx.cc.utexas.edu> jamshid@emx.cc.utexas.edu (Jamshid Afshar) writes:
  15. >
  16. >    int i;
  17. >    int** p = &i;
  18. >
  19. >But isn't the above code legal C?  Isn't an ANSI C compiler *required*
  20. >to compile the code (and required to issue some kind of warning).  My
  21. >point is that the above code will be compiled by an ANSI C compiler,
  22. >but not by a C++ compiler.
  23. >
  24.  
  25.     Yes, it is legal C.  I was thinking C++ when I wrote my earlier 
  26. response.
  27.     No, the compiler is not required to issue a warning.  There are no
  28. mandatory warnings in ANSI C.  The only requirement on diagnostics is that
  29. the compiler must generate a diagnostic when it attempts to compile a 
  30. non-conforming program.
  31.     -- Pete
  32.  
  33.  
  34.