<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Issue 1236: reserved identifiers in programs not using the library</title>
<meta property="og:title" content="Issue 1236: reserved identifiers in programs not using the library">
<meta property="og:description" content="C++ library issue. Status: NAD">
<meta property="og:url" content="https://cplusplus.github.io/LWG/issue1236.html">
<meta property="og:type" content="website">
<meta property="og:image" content="http://cplusplus.github.io/LWG/images/cpp_logo.png">
<meta property="og:image:alt" content="C++ logo">
<style>
  p {text-align:justify}
  li {text-align:justify}
  pre code.backtick::before { content: "`" }
  pre code.backtick::after { content: "`" }
  blockquote.note
  {
    background-color:#E0E0E0;
    padding-left: 15px;
    padding-right: 15px;
    padding-top: 1px;
    padding-bottom: 1px;
  }
  ins {background-color:#A0FFA0}
  del {background-color:#FFA0A0}
  table.issues-index { border: 1px solid; border-collapse: collapse; }
  table.issues-index th { text-align: center; padding: 4px; border: 1px solid; }
  table.issues-index td { padding: 4px; border: 1px solid; }
  table.issues-index td:nth-child(1) { text-align: right; }
  table.issues-index td:nth-child(2) { text-align: left; }
  table.issues-index td:nth-child(3) { text-align: left; }
  table.issues-index td:nth-child(4) { text-align: left; }
  table.issues-index td:nth-child(5) { text-align: center; }
  table.issues-index td:nth-child(6) { text-align: center; }
  table.issues-index td:nth-child(7) { text-align: left; }
  table.issues-index td:nth-child(5) span.no-pr { color: red; }
  @media (prefers-color-scheme: dark) {
     html {
        color: #ddd;
        background-color: black;
     }
     ins {
        background-color: #225522
     }
     del {
        background-color: #662222
     }
     a {
        color: #6af
     }
     a:visited {
        color: #6af
     }
     blockquote.note
     {
        background-color: rgba(255, 255, 255, .10)
     }
  }
</style>
</head>
<body>
<hr>
<p><em>This page is a snapshot from the LWG issues list, see the <a href="lwg-active.html">Library Active Issues List</a> for more information and the meaning of <a href="lwg-active.html#NAD">NAD</a> status.</em></p>
<h3 id="1236"><a href="lwg-closed.html#1236">1236</a>. reserved identifiers in programs not using the library</h3>
<p><b>Section:</b> 16 <a href="https://wg21.link/library">[library]</a> <b>Status:</b> <a href="lwg-active.html#NAD">NAD</a>
 <b>Submitter:</b> Sean Hunt <b>Opened:</b> 2009-10-13 <b>Last modified:</b> 2016-01-28</p>
<p><b>Priority: </b>Not Prioritized
</p>
<p><b>View other</b> <a href="lwg-index-open.html#library">active issues</a> in [library].</p>
<p><b>View all other</b> <a href="lwg-index.html#library">issues</a> in [library].</p>
<p><b>View all issues with</b> <a href="lwg-status.html#NAD">NAD</a> status.</p>
<p><b>Discussion:</b></p>
<p>
I wasn't sure whether to consider this a library or a language issue,
because the issue is I think it's incorrectly categorized as being part
of the library, so I thought I'd send a message to both of you and let
you sort it out.
</p>

<p>
Most reserved identifiers are treated as unilaterally available to the
implementation, such as to implement language extensions, or provide
macros documenting its functionality. However, the requirements for
reserved identifers are in 16.4.5.3 <a href="https://wg21.link/reserved.names">[reserved.names]</a>, which are a
subsection of 16.4.5 <a href="https://wg21.link/constraints">[constraints]</a>. 16.4.5.1 <a href="https://wg21.link/constraints.overview">[constraints.overview]</a> appears only to apply to "C++ programs
that use the facilities of the C++ standard library", meaning that, in
theory, all implementations are erroneous in having any non-standard
identifiers predefined for programs that do not, at some point, include
a standard library header.
</p>

<p>
Furthermore, it's unclear whether the use of certain identifiers is UB
or results in an ill-formed program. In particular, 16.4.5.3.3 <a href="https://wg21.link/macro.names">[macro.names]</a> uses a "shall not", where  [global.names] says that names are "reserved to the
implementation". 16.4.5.3 <a href="https://wg21.link/reserved.names">[reserved.names]</a> seems only to cover the
instance of a name being described as "reserved", so are implementations
required to diagnose a program that performs, as an example, "<code>#undef
get</code>"?
</p>

<p><i>[
2009 Santa Cruz:
]</i></p>


<blockquote><p>
Move to NAD. There may in theory be multiple interpretations possible,
but there's no evidence that this causes any genuine problems or
uncertainty about what implementations are allowed to do. We do not
believe this rises to the level of a defect.
</p></blockquote>



<p id="res-1236"><b>Proposed resolution:</b></p>





</body>
</html>
