Revision: 44245 http://brlcad.svn.sourceforge.net/brlcad/?rev=44245&view=rev Author: brlcad Date: 2011-04-07 01:17:00 +0000 (Thu, 07 Apr 2011)
Log Message: ----------- add __BU_ATTR_ALWAYS_INLINE with a protection for gcc 3.4 and earlier where the always_inline attribute wasn't yet fully implemented (reportedly still works for some optimization options) Modified Paths: -------------- brlcad/trunk/include/bu.h brlcad/trunk/include/common.h Modified: brlcad/trunk/include/bu.h =================================================================== --- brlcad/trunk/include/bu.h 2011-04-06 21:48:56 UTC (rev 44244) +++ brlcad/trunk/include/bu.h 2011-04-07 01:17:00 UTC (rev 44245) @@ -152,6 +152,11 @@ #define __BU_ATTR_NORETURN __attribute__ ((__noreturn__)) /** + * shorthand declaration of a function that should always be inline + */ +#define __BU_ATTR_ALWAYS_INLINE __attribute__ ((always_inline)) + +/** * If we're compiling strict, turn off "format string vs arguments" * checks - BRL-CAD customizes the arguments to some of these * function types (adding bu_vls support) and that is a problem with Modified: brlcad/trunk/include/common.h =================================================================== --- brlcad/trunk/include/common.h 2011-04-06 21:48:56 UTC (rev 44244) +++ brlcad/trunk/include/common.h 2011-04-07 01:17:00 UTC (rev 44245) @@ -187,6 +187,13 @@ # endif #endif +/* gcc 3.4 doesn't seem to support always_inline with -O0 (yet -Os + * reportedly works), so turn it off. + */ +#if !GCC_PREREQ(3, 5) +# define always_inline noinline +#endif + /** * UNUSED provides a common mechanism for declaring unused parameters. * Use it like this: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits