home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20245 comp.lang.c++:19937
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: sparky!uunet!ukma!gatech!concert!decwrl!borland.com!pete
- From: pete@borland.com (Pete Becker)
- Subject: Re: C/C++ Correctness (was: Re: C/C++ Speed)
- Message-ID: <1993Jan27.234010.13363@borland.com>
- Originator: pete@genghis.borland.com
- Sender: news@borland.com (News Admin)
- Organization: Borland International
- References: <1jic36INNhn5@emx.cc.utexas.edu> <1993Jan20.185607.2938@borland.com> <1k6m67INNgqv@emx.cc.utexas.edu>
- Date: Wed, 27 Jan 1993 23:40:10 GMT
- Lines: 20
-
- In article <1k6m67INNgqv@emx.cc.utexas.edu> jamshid@emx.cc.utexas.edu (Jamshid Afshar) writes:
- >
- > int i;
- > int** p = &i;
- >
- >But isn't the above code legal C? Isn't an ANSI C compiler *required*
- >to compile the code (and required to issue some kind of warning). My
- >point is that the above code will be compiled by an ANSI C compiler,
- >but not by a C++ compiler.
- >
-
- Yes, it is legal C. I was thinking C++ when I wrote my earlier
- response.
- No, the compiler is not required to issue a warning. There are no
- mandatory warnings in ANSI C. The only requirement on diagnostics is that
- the compiler must generate a diagnostic when it attempts to compile a
- non-conforming program.
- -- Pete
-
-
-