This is the mail archive of the gcc@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]

Re: Functions that always return


On Sun, Oct 29, 2000 at 11:19:45AM -0400, Geert Bosch wrote:
> Even a pure or const function is not guaranteed to return.
> Any function can raise an exception (as in C++/Ada) and
> in particular a stack-check may fail at any time.

At least for C++ we don't mark functions constant if they can
raise exceptions.   And there are no stack checks to worry about.

So unless you don't mind getting a division-by-zero or memory
fault or whatever instead of your function's exception, you'd
better not be marking these a const in Ada.


r~

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