<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Migrating this from the std-discussion list; it’s more appropriate here.<br><br>On Thursday, January 23, 2014 9:15:41 AM UTC+8, Richard Smith wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div class="gmail_quote">On Tue, Jan 7, 2014 at 1:39 AM, David Krauss <span dir="ltr"><<a target="_blank" gdf-obfuscated-mailto="kFhc8x3Y8sYJ">pot...@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are no requirements about what happens when these resource limits are exceeded.<br></blockquote><div><br></div><div>This
is the intent, and is deliberate. If you run your compiler out of
memory or stack space, or otherwise exceed its limits in a way which it
might not be able to defend against, it is not required to produce a
diagnostic.</div></div></div></blockquote><div><br>If a program is
abnormally terminated, most environments emit a message which
counts toward the diagnostic requirement. An OS/shell which doesn't, or which
allows the stack to overflow into the heap, is unsuitable for
development work.<br><br>Running out of heap space may be diagnosed by the usual means: std::bad_alloc, check for null pointer results.<br><br>Internal buffer overflows related to hard-coded limits can and should always be caught.<br><br>Moreover there's no excuse for generating and executing a defective program.<br><br>In a strict sense, exceeded limits incurring UB seems to negate any guarantee that C++ can express a nontrivial program.<br><br></div></body></html>