throw(), pure and const flags on functions

Mark Mitchell mark@codesourcery.com
Wed Apr 15 18:12:00 GMT 2009


Paolo Carlini wrote:

> I see. Remember to "uglify" always "uglify" in the library, thus it
> would be _ATTRIBUTE_PURE, or something like that, with an underscore at
> the beginning. Indeed, we have a place for those things,
> include/bits/c++config, should be ok.

I'd go so far as to suggest __GLIBCXX_PURE, but that's of course a call
for the libstdc++ maintainers to make.  I'd try to use as small a chunk
of the macro namespace as possible...  Do macros get expanded inside
attributes?  If so, can we use "__attribute__ ((__pure__))" instead of
"pure"?

Jan, I'd also love to see performance figures about how much this helps.
 As always with optimizations, I'd like more quantitative data.  Here,
it's not so important since there's no downside I can see, but it would
still be fun to know that this actually does something valuable. :-)

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list