Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:55666 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95898 invoked from network); 29 Sep 2011 18:07:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Sep 2011 18:07:10 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:39451] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 81/42-15741-BC3B48E4 for ; Thu, 29 Sep 2011 14:07:07 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id C5B2870004A2 for ; Thu, 29 Sep 2011 19:07:03 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id Hnh05xZBUSZD for ; Thu, 29 Sep 2011 19:07:03 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 81DEF700049E for ; Thu, 29 Sep 2011 19:07:03 +0100 (WEST) Received: from cataphract-old.dulce.lo.geleia.net (cataphract-old.dulce.lo.geleia.net [IPv6:2001:470:94a2:2:9978:6e7:759:40ee]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 1DB2D20010A9 for ; Thu, 29 Sep 2011 19:07:01 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <4E848B31.2030501@gmail.com> <4E84A73E.8030601@gmail.com> Date: Thu, 29 Sep 2011 19:06:54 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_IST?= Message-ID: In-Reply-To: <4E84A73E.8030601@gmail.com> User-Agent: Opera Mail/11.51 (Win32) Subject: Re: [PHP-DEV] Cast trap with INI entries compiling C++ extension From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Thu, 29 Sep 2011 18:13:34 +0100, =C3=81ngel Gonz=C3=A1lez = wrote: > On 29/09/11 17:42, Olivier Favre wrote: >> I checked with a tiny test program, you're right about GCC complainin= g. >> The right fix is to make the field const (I don't know about const = >> keyword). >> G++ won't give warnings, no error would be triggered by a broken fix.= >> >> By the way, const char* and char const* are the same, you probably >> meant char * const. > Is it? > I never remember which one is a mutable pointer of const chars and whi= ch > the const pointer of mutable chars so I relied on the description at > http://stackoverflow.com/questions/162480/const-in-c#answer-162504 > before sending the mail. > const char * and char const * are the same (just like const int and int = = const are the same); what's not the same is char *const. -- = Gustavo Lopes