On 19 Jun 2015, at 12:57, Hans Petter Selasky <h...@selasky.org> wrote: > > Hi, > >> Then they will get a compile error no matter what GNUstep’s Foundation.h >> does. It can’t prevent cdefs.h from redefining __weak to be something >> different. >> > > Except "#undef __weak”
Please read the example that I wrote. This will *not* be fixed by #undef __weak. In particular, the __weak keyword is implemented in Clang as a pre-defined macro, so after *any* inclusion of any C standard library header, every program that uses zeroing weak references needs to redefine __weak to whatever (implementation-defined and subject to change thing) that the compiler defines it to. >> I’ve just looked at the GNUstep base changelog since that NetBSD commit and >> there are no relevant changes, so I’ve no idea what the NetBSD people are >> thinking there. >> > > I think we should have a common cross-BSD solution for the proper definition > of __weak, so that user-space applications which use it follow along. Portable code should not rely on anything in cdefs.h. > Is there a procedure for that? Possibly we should do an exp-run after > changing this to ensure that we don't break more than we fix. I’m not sure what we have any code in ports yet that uses ARC or GC in Objective-C, but I definitely know of people building out-of-ports programs on FreeBSD whose code you have just broken (including myself, though I do Objective-C stuff on 10, so haven’t yet encountered the breakage). > I'll ask some GNUstep people I know about this. Taking off my FreeBSD Core Team hat and putting on my GNUstep libobjc maintainer hat: Please fix this and do not define C-family language keywords or compiler reserved words to be incompatible things in cdefs.h. David _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"