Article View: comp.std.c++
Article #686implicit pointer of pointer argument promotion legal C++?
From: Quentin Barnes
Date: Thu, 08 Oct 1992 16:26
Date: Thu, 08 Oct 1992 16:26
23 lines
1277 bytes
1277 bytes
In ANSI-C, the following code is not legal:
void f(const char **s);
void g()
{
char **s = 0;
f(s);
}
ANSI-C does not allow for implicit conversion of pointer of pointer
arguments. (See 3.3.2.2 for discussion of promotion of function
arguments. This case is one that does not hold true for 3.3.16.1).
Cfront 3.0.1 eats the non-ANSI-C code without blinking.
I can't find in the 23-sep-91 ANSI-C++ draft if pointer of pointer
promotion is allowed or disallowed. Can anyone point me to the
appropriate reference(s) so I know whether cfront is broken or not?
BTW, what's the latest ANSI-C++ draft?
--
Quentin Barnes
qbarnes@urbana.mcd.mot.com | ..!uiucuxc!udc!qbarnes
Technical Details
Message-ID:
<1992Oct8.162653.12028@urbana.mcd.mot.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!know!mips2!cass.ma02.bull.com!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!ditka!starnet!motcsd!udc!qbarnesShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!know!mips2!cass.ma02.bull.com!think.com!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!unixhub!ditka!starnet!motcsd!udc!qbarnes From: qbarnes@urbana.mcd.mot.com (Quentin Barnes) Newsgroups: comp.std.c++ Subject: implicit pointer of pointer argument promotion legal C++? Message-ID: <1992Oct8.162653.12028@urbana.mcd.mot.com> Date: 8 Oct 92 16:26:53 GMT Sender: news@urbana.mcd.mot.com (News) Organization: Motorola Computer Group, Urbana Design Center Lines: 23 Nntp-Posting-Host: neptune.urbana.mcd.mot.com