public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libobjc/47012] New: nonatimic Properties behave wrong
@ 2010-12-19 12:10 js-gcc at webkeks dot org
  2010-12-19 18:31 ` [Bug libobjc/47012] nonatomic " nicola at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: js-gcc at webkeks dot org @ 2010-12-19 12:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47012

           Summary: nonatimic Properties behave wrong
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: js-gcc@webkeks.org


It seems nonatomic properties retain and autorelease the result, which is
breaking existing code targeting the Apple runtime.

This bug has been also in the GNUstep runtime and the Cocotron runtime, it
seems this bug has been copied to the new GNU runtime now.

The Apple doc says:
"If you specify nonatomic, then a synthesized accessor for an object property
simply returns the value directly."
<http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocProperties.html>

I have written a property implementation which is known to be compatible to the
Apple runtime which is quite short and I'd like to contribute. It is currently
licensed under the QPL, but I plan to relicense it as GPL if you are
interested.

If you need a testcase, there is a test for properties included in ObjFW
<https://webkeks.org/hg/objfw>, in src/PropertiesTests.m, which also fails. It
works well with the Apple runtime and the included properties implementation in
src/objc-properties.m - this is also the implementation I'd like to contribute.
Let me know if you are interested.

Direct links:
Runtime I'd like to contribute:
<https://webkeks.org/hg/objfw/file/tip/src/objc_properties.m> (Will relicense
if there's interest!)
Tests that fail:
<https://webkeks.org/hg/objfw/file/tip/tests/PropertiesTests.m>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-12-21 11:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-19 12:10 [Bug libobjc/47012] New: nonatimic Properties behave wrong js-gcc at webkeks dot org
2010-12-19 18:31 ` [Bug libobjc/47012] nonatomic " nicola at gcc dot gnu.org
2010-12-19 18:49 ` js-gcc at webkeks dot org
2010-12-19 19:10 ` nicola at gcc dot gnu.org
2010-12-19 19:12 ` nicola at gcc dot gnu.org
2010-12-19 19:15 ` nicola at gcc dot gnu.org
2010-12-19 19:19 ` js-gcc at webkeks dot org
2010-12-21 10:56 ` nicola at gcc dot gnu.org
2010-12-21 11:26 ` js-gcc at webkeks dot org
2010-12-21 11:39 ` nicola at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).