Apple's gcc can't handle deprecated attribute
mk-macports at techno.ms
mk-macports at techno.ms
Fri Oct 5 03:32:13 PDT 2012
On Oct 5, 2012, at 11:37 AM, Jeremy Huddleston Sequoia wrote:
> Your changes would present a message of deprecation at compile time if someone used result_free, but the resulting executable would fail to link. I fixed such that it the call to result_free() would be rewritten to csvdb_free_result at compile time.
Hi Jeremy,
thanks for contributing these patches. That one here:
---
-void result_free(result_t *r) __attribute__ ((deprecated ("use csvdb_free_result")));
+static void result_free(result_t *r) __attribute__ ((deprecated)) __attribute__ ((weakref("csvdb_free_result")));
---
I'd never ever have figured out myself. :)
>> (At least it does build fine for me here, as well as for the buildbot.)
>
> Yeah, the project builds fine, but a client of the project using the deprecated result_free() would fail. Hopefully my 3am explanation above is not too incoherent.
I was delighted to get this insight into gcc attributes!
Thanks again,
Marko
More information about the macports-dev
mailing list