Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
__weak definition and problems with Obj-C
Hi,
when using current NetBSD and compiling GNUstep (current objective-c
stuff from svn, not packages) I get for about any obj-c file these
redefinition warnings:
Compiling file main.m ...
In file included from
/System/Library/Headers/GNUstepBase/GSVersionMacros.h:219:0,
from /System/Library/Headers/AppKit/AppKit.h:32,
from main.m:25:
/System/Library/Headers/GNUstepBase/GSConfig.h:417:0: warning: "__weak"
redefined [enabled by default]
# define __weak
^
In file included from /usr/include/sys/cdefs.h:60:0,
from /usr/include/inttypes.h:35,
from /System/Library/Headers/GNUstepBase/GSConfig.h:154,
from
/System/Library/Headers/GNUstepBase/GSVersionMacros.h:219,
from /System/Library/Headers/AppKit/AppKit.h:32,
from main.m:25:
/usr/include/sys/cdefs_elf.h:68:0: note: this is the location of the
previous definition
#define __weak __attribute__((__weak__))
^
on 6.1.5 instead everything works fine there. On 6.1.5, I see this in
the header file instead:
#define __weak_reference(sym) __attribute__((__weakref__(#sym)))
This change looks bad, it would make NetBSD incompatible with Obj-c
apparently! I asked on the gnustep list and the reply was to report a bug.
Since it works in the 6.1.5 release (and did for all versions I have run
GNUstep on, so since 1.6 for sure...), I write here first.
Riccardo
Home |
Main Index |
Thread Index |
Old Index