throw(), pure and const flags on functions

Paolo Carlini paolo.carlini@oracle.com
Tue Apr 14 14:53:00 GMT 2009


Hi,
> Only functions both defined and used within single compilation unit are
> fine without decorations.  LTO change definition of compilation unit to
> "whole program without shared libraries".
>   
Ok...
> Functions declared in libstdc++ header and defined in libstdc++ .cc file
> do not belong to this category.  If you decorate such function with
> attribute in the libstdc++ header, GCC will be able to optimize better
> programs that do use it (either directly or indirectly via inline
> function in libstdc++ header).
>   
Ok. Then, again, essentially facilities exported by the *.so are
involved, only, we should decorate the declarations, not the definitions
in the *.cc. Still, we are talking about the same facilities,
necessarily very few of them, not the bulk of the library, all the
templatized functions and classes. That would make sense to me. And,
again, since you really have a feeling of the situation, it would be
nice if you could post something more concrete...

Paolo.



More information about the Libstdc++ mailing list