<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 4, 2011, at 18:41 , Fariborz Jahanian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I am working on a code-base that for various reasons has instance variables declared in both the @interface and the @implementation section.  Using gcc 4.2, this is OK, but clang in 64 bit aborts with the following error:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 12px; text-indent: -12px; font: normal normal normal 11px/normal Menlo; "><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;">[..]</span></font></span></font></div></div><div>In 32 bit mode, clang is OK with this, as is gcc 4.2 in both 32 bit and 64 bit mode.  Any way to turn this error off in clang 64 bit mode?</div></div></blockquote><div><br></div>-m64 uses the non-fragile abi. This mode has a few language extensions, one of which is allowing to add 'private' ivars</div><div>to the class via @implementation. So, each ivar is checked against existing ivars and diagnostic is issued for a redeclaration.</div></div></blockquote><div><br></div><div>Yep.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>You can work around this problem by adding -fno-objc-nonfragile-abi to your command line. But I should caution that </div><div>we don't test nonfragile-abi in 64bit mode. And you may likely run into other issues.</div></div></blockquote><br></div><div><br></div>Ahh, that was the flag I was looking for!  Tried it and the errors go away, except that the linker now fails (without even an error message).  Which makes sense considering all the libs it is trying to link against were almost certainly compiled with the non-fragile ABI...so I guess I should have seen that one coming.<div><br></div><div>Thanks for the pointer, learn something new every day!</div><div><br></div><div>Marcel</div><div><br></div></body></html>