This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: throw(), pure and const flags on functions


On Tue, Apr 14, 2009 at 4:11 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>> Hi,
>> I am trying to improve quality of IPA analysis of C++ code and I tend to
>> run into issues with amount of code we generate for EH and also amount
>> of calls to library.
>> It seems that PURE and CONST attributes in general are not used in
>> libstdc++ headers and there are also some cases where I think throw ()
>> marker is missing, like in _Rb_tree_increment.
>>
> well, to be honest I'm not that enthusiastic about the idea of adding
> attributes in a lot of different places everywhere. In general, in this
> area, I would have expected a smooth progress in the compiler,

I emphatically agree with Paolo.  In many cases (such as
_Rb_tree_increment) the compiler -- i.e. at relatively high
level such as GIMPLE -- should infer those properties.
Having humans to add those decorations is asking for pain
in maintainance and obscure readability  -- and in many cases,
the machines is  much better at than job.

Definitely, there are cases where it is too much for the tool.
But there are clearly low hanging fruits that the tool shout
get.

> gradually
> becoming able to discover on its own more and more pure, const, and not
> throwing functions. I'd like to ear Mark about these issues, I remember
> he had some definite ideas about that, for libsupc++ in particular, now
> I'd like to know his opinion about the C++ library proper.
>
> Paolo.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]