On Thu, May 21, 2009 at 11:11 AM, Ian Lance Taylor wrote:
> Richard Guenther writes:
>
>> On Thu, May 21, 2009 at 1:50 PM, Andreas Schwab
>> wrote:
>>> Ian Lance Taylor writes:
>>>
Consider this C/C++ program:
extern void **f1();
void f2(const char *p) { *(const void **)f1(
On Thu, May 21, 2009 at 5:20 AM, Richard Guenther
wrote:
> On Thu, May 21, 2009 at 7:10 AM, Ian Lance Taylor wrote:
>> Consider this C/C++ program:
>>
>> extern void **f1();
>> void f2(const char *p) { *(const void **)f1() = p; }
>>
>> If I compile this program with g++ -Wcast-qual, I get this:
>
On Thu, May 21, 2009 at 12:10 AM, Ian Lance Taylor wrote:
> Consider this C/C++ program:
>
> extern void **f1();
> void f2(const char *p) { *(const void **)f1() = p; }
>
> If I compile this program with g++ -Wcast-qual, I get this:
>
> foo2.cc:2: warning: cast from type ‘void**’ to type ‘const voi
Richard Guenther writes:
> On Thu, May 21, 2009 at 1:50 PM, Andreas Schwab wrote:
>> Ian Lance Taylor writes:
>>
>>> Consider this C/C++ program:
>>>
>>> extern void **f1();
>>> void f2(const char *p) { *(const void **)f1() = p; }
>>>
>>> If I compile this program with g++ -Wcast-qual, I get th
"Joseph S. Myers" writes:
> On Wed, 20 May 2009, Ian Lance Taylor wrote:
>
>> All that aside, I can't think of any reason that the C and C++ frontends
>> should be different in this regard. Does anybody want to make an
>
> There's the fairly obvious reason that C and C++ have different rules on
Ian Lance Taylor wrote:
> Consider this C/C++ program:
>
> extern void **f1();
> void f2(const char *p) { *(const void **)f1() = p; }
>
> If I compile this program with g++ -Wcast-qual, I get this:
>
> foo2.cc:2: warning: cast from type ‘void**’ to type ‘const void**’ casts away
> qualifiers
>
Richard Guenther wrote:
> On Thu, May 21, 2009 at 1:50 PM, Andreas Schwab wrote:
>
>> Ian Lance Taylor writes:
>>
>>
>>> Consider this C/C++ program:
>>>
>>> extern void **f1();
>>> void f2(const char *p) { *(const void **)f1() = p; }
>>>
>>> If I compile this program with g++ -Wcast-qual
Richard Guenther writes:
> For
>
> extern const char **f1();
> void f(char *p)
> {
> *(char **)f1() = p;
> }
>
> it warns with
>
> t.C: In function ‘void f(char*)’:
> t.C:4: warning: cast from type ‘const char**’ to type ‘char**’ casts
> away constness
>
> which makes sense.
This is actually a
On Thu, May 21, 2009 at 1:50 PM, Andreas Schwab wrote:
> Ian Lance Taylor writes:
>
>> Consider this C/C++ program:
>>
>> extern void **f1();
>> void f2(const char *p) { *(const void **)f1() = p; }
>>
>> If I compile this program with g++ -Wcast-qual, I get this:
>>
>> foo2.cc:2: warning: cast fr
On Wed, 20 May 2009, Ian Lance Taylor wrote:
> All that aside, I can't think of any reason that the C and C++ frontends
> should be different in this regard. Does anybody want to make an
There's the fairly obvious reason that C and C++ have different rules on
implicit conversions involving cons
Ian Lance Taylor writes:
> Consider this C/C++ program:
>
> extern void **f1();
> void f2(const char *p) { *(const void **)f1() = p; }
>
> If I compile this program with g++ -Wcast-qual, I get this:
>
> foo2.cc:2: warning: cast from type ‘void**’ to type ‘const void**’ casts away
> qualifiers
I
On Thu, May 21, 2009 at 7:10 AM, Ian Lance Taylor wrote:
> Consider this C/C++ program:
>
> extern void **f1();
> void f2(const char *p) { *(const void **)f1() = p; }
>
> If I compile this program with g++ -Wcast-qual, I get this:
>
> foo2.cc:2: warning: cast from type ‘void**’ to type ‘const void
12 matches
Mail list logo