This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [patch] 2 patches for PR tree-optimization/34648


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 really don't think we should get into the business of trying to
figure out what it means to have a no-side-effect functions that can
throw.
If we want something that means "can only x or y" (where x and y are
some set of things like read global memory, etc), then we should have
separate attributes for those, and deprecate pure/const (IE make them
just aliases for some certain set of these attributes), not change the
meaning of pure/const to mean "no side-effects except for some
side-effects".


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