home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c:20314 comp.lang.c++:20030
- Newsgroups: comp.lang.c,comp.lang.c++
- Path: sparky!uunet!taumet!steve
- From: steve@taumet.com (Steve Clamage)
- Subject: Re: C/C++ Correctness (was: Re: C/C++ Speed)
- Message-ID: <1993Jan28.165659.27271@taumet.com>
- Organization: TauMetric Corporation
- References: <1jic36INNhn5@emx.cc.utexas.edu> <1993Jan20.185607.2938@borland.com> <1k6m67INNgqv@emx.cc.utexas.edu> <1993Jan27.234010.13363@borland.com>
- Date: Thu, 28 Jan 1993 16:56:59 GMT
- Lines: 19
-
- pete@borland.com (Pete Becker) writes:
-
- >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? ...
-
- > Yes, it is legal C...
-
- No, it is NOT legal C. The type of p is int**, and the type of &i
- is int*. This violates a constraint in ANSI section 3.3.16.1 (Simple
- Assignment), and must be diagnosed as an error. Although this is
- technically an initialization, section 3.5.7 (Initialization) says that
- the rules for assignment apply.
- --
-
- Steve Clamage, TauMetric Corp, steve@taumet.com
-