[patch] 2 patches for PR tree-optimization/34648
Andrew MacLeod
amacleod@redhat.com
Thu Jan 17 20:14:00 GMT 2008
Daniel Berlin wrote:
> On Jan 17, 2008 12:12 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>
>>>>> I think both patches are ok, but if anyone is concerned we can leave the
>>>>> changing of tree_could_throw_p to stage1.
>>>>>
>>>> Yes, I don't think now is the right time to make such a non-trivial change.
>>>>
>>> No problem.
>>>
>> Anyway, it just seems to me that C/C++ could explicitly map const/pure
>> to const+nothrow and pure+nothrow, by setting TREE_NOTHROW (*node) = 1,
>> if they wish it to be so. It might even be clearer, actually, to do it
>> this way.
>>
>
> I disagree, unless we also abort if you have it without nothrow.
> No side-effects means no side-effects. Exceptions are clearly are side-effect
>
I would think so too.
Ada does in fact fail to compile with that change, so it does depends on
ECF_CONST being able to throw. This does seem wrong to me, but its
probably too late to address it in stage3. We should straighten this
out in stage 1 of 4.4 though.
Ada fails with a message something like "error: statement marked for
throw, but doesn't"
Andrew
More information about the Gcc-patches
mailing list