-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Someone in IRC reported some problems with gcc-4.1.x and turned-off optimization, which disappeared when optimization was turned on (as weird as it seems). Apparently, the compiler forgot to generate assembler code for some functions that are marked as "static inline" but were used through function pointers. Most prominent example here is in src/engine/Account.c: on_err(), acc_free(), noop().
Although this is surely a bug on the compiler side, I'd nevertheless like to ask whether the "static inline" are correct function attributes anyway. If that function is used by a function pointer only, then it surely cannot be inlined anyway, and I'd rather suggest changing these to "static" only. I tracked down the introduction of that "static inline". The functions itself in src/engine/Account.c were introduced by Linas in http://svn.gnucash.org/trac/changeset/9522 in order to clean up the xaccAccountCommitEdit function. Linas introduced the GNC_COMMIT_EDIT_PART2 macro here and called the functions in that macro. When called in a macro, "inline" functions of course make some sense because they *can* be inlined. This was merged onto HEAD in 9530. The COMMIT_EDIT macro call was turned into a function call (qof_commit_edit_part2) by chris in http://svn.gnucash.org/trac/changeset/13395#file9 which means the on_err/acc_free/noop functions were now called through function pointers and surely not inlined anymore. At this point the "inline" doesn't make any more sense. I suggest to change "static inline" into "static" for all instances where a function is used only through function pointers. This mostly concerns all the callback functions for qof_commit_edit_part2. Any objections here? Christian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQCVAwUBRW1gO2XAi+BfhivFAQJstgP+PDCUkNwJEcS6Y3DXUzsgERNaX5mEEk1O NsSighPvQvKGKPLkuU9q2uy8HXUZIXNDJepHTqHJMSmrsCaPrNTpjxAXrGYpo4bY tIdxoInukpqNjP0h4OY0V+VnmMsdxvEwAh0fJgL9XfBc6HF1F8+MvljP61cXx0d2 P0ld8EiDJuc= =HfK8 -----END PGP SIGNATURE----- _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
