<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Proposed wording for likely and unlikely attributes (Revision 5)</title>

<style type="text/css">
html {
  font-family: sans-serif;
  line-height: 1.25em;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 10px;
  padding: 0;
  counter-reset: end_note_counter;
}

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

pre {
  font-family: monospace, monospace;
  font-size: .9em;
  background-color: #f3f3f3;
  padding: 1em;
}

code{
  font-family: monospace, monospace;
  font-size: 1em;
  background-color: #f3f3f3;
}

table {
  border-collapse: collapse;
  margin-bottom: 1em;
}

table, th, td {
  border: 1px solid #000;
}

th, td {
  text-align: left;
  padding: 0 .4em;
  font-size: .9em;
}

tr.stripe {
  background-color: #f3f3f3;
}

span.foot:before {
  font-size: smaller;
  margin-left: .3em;
  vertical-align: super;
  line-height: 0;
  counter-increment: end_note_counter;
  content: "[" counter(end_note_counter) "]";
}

ins { 
  text-decoration:none; 
  background-color:#A0FFA0 
}

.mono {
  font-family: monospace, monospace;
}

</style>

</head>
<body>
Document number: P0479R5<br/>
Date: 2018-03-16<br/>
Audience: Core Working Group, SG14<br/>
Reply-to: Clay Trychta &lt;clay.trychta@gmail.com&gt;<br/>

<h1>Proposed wording for likely and unlikely attributes (Revision 5)</h1> 

<h2 id="wording">Wording</h2>

<blockquote>

<p>
<ins>10.6.N Likelihood attributes [dcl.attr.likelihood]</ins>
</p>

<p>
<ins>
The <em>attribute-token</em>s <span class="mono"><strong>likely</strong></span> and <span class="mono"><strong>unlikely</strong></span> may be applied to labels or statements.  The <em>attribute-token</em>s <span class="mono"><strong>likely</strong></span> and <span class="mono"><strong>unlikely</strong></span>  shall appear at most once in each <em>attribute-list</em> and no <em>attribute-argument-clause</em> shall be present. The <em>attribute-token</em> <span class="mono"><strong>likely</strong></span> shall not appear in an <em>attribute-specifier-seq</em> that contains the <em>attribute-token</em> <span class="mono"><strong>unlikely</strong></span>. 
</ins>
</p>

<p>
<ins>
[<em>Note:</em> 
The use of the <span class="mono"><strong>likely</strong></span> attribute is intended to allow implementations to optimize for the case where paths of execution including it are arbitrarily more likely than any alternative path of execution that does not include such an attribute on a statement or label.

The use of the <span class="mono"><strong>unlikely</strong></span> attribute is intended to allow implementations to optimize for the case where paths of execution including it are arbitrarily more unlikely than any alternative path of execution that does not include such an attribute on a  statement or label.

A path of execution includes a label if and only if it contains a jump to that label.

Excessive usage of either of these attributes is liable to result in performance degradation.    

<em>&mdash; end note</em>]
</ins>
</p>

</blockquote>

<h2 id="acknowledgements">Acknowledgements</h2>
Thank you to Jens Maurer, Chandler Carruth, Andrew Pardoe, Davis Herring, John McFarlane, Bartosz Bielecki, Carl Cook, Matt Dziubinski, Mathias Gaunard, Paul Hampson, and others in SG14 for sharing their insights and suggestions.

</body>
</html>

