Re: Cast trap with INI entries compiling C++ extension

From: Date: Thu, 29 Sep 2011 18:06:54 +0000
Subject: Re: Cast trap with INI entries compiling C++ extension
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-55666@lists.php.net to get a copy of this message
On Thu, 29 Sep 2011 18:13:34 +0100, Ángel González <keisial@gmail.com> wrote:
On 29/09/11 17:42, Olivier Favre wrote:
I checked with a tiny test program, you're right about GCC complaining. 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 which 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

« previous php.internals (#55666) next »