[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: GCC 3.4.1 and warning
From: |
Manuel Guesdon |
Subject: |
Re[2]: GCC 3.4.1 and warning |
Date: |
Thu, 23 Dec 2004 09:50:09 +0100 (CET) |
On Thu, 23 Dec 2004 00:34:31 +0100 Helge Hess <address@hidden> wrote:
>| On 22. Dez 2004, at 20:21 Uhr, Manuel Guesdon wrote:
>| > With gcc 3.4.1, ASSIGNCOPY() produce a warning: "warning: use of cast
>| > expressions as lvalues is deprecated"
>| > Here is a patch (removing the (id) before object = ):
>| >
>| > diff NSObject.h.old NSObject.h.new
>| > 470c470
>| > < (id)object = __value; \
>| > ---
>| >> object = __value; \
>|
>| Since ASSIGNCOPY is a macro and object can be of a different type than
>| __value, I would assume that
>| object = (id)__value; \
>| would be correct, right?
Yes but as __ value is already defined as id, it
change nothing.
The compiler warning come from the (id) cast on object: (id)object = __value;
Changing it to object = __value; make gcc happy.
Manuel