GNOME Bugzilla – Bug 676100
need G_GNUC_PURE instead of G_GNUC_CONST for _get_type() functions
Last modified: 2012-05-15 14:31:47 UTC
From the GCC manual: `const' Many functions do not examine any values except their arguments, and have no effects except the return value. Basically this is just slightly more strict class than the `pure' attribute below, since function is not allowed to read global memory. But _get_type() functions obviously *do* read global memory, so it's wrong for us to annotate them as const. What we really mean is "pure": `pure' Many functions have no effects except the return value and their return value depends only on the parameters and/or global variables. Such a function can be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be.
*** This bug has been marked as a duplicate of bug 64994 ***