Changes in / [18387ef:76b48f1]


Ignore:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    r18387ef r76b48f1  
    2727# generated by bison and lex from cfa.yy and lex.ll, respectively
    2828src/Parser/parser.output
    29 
    30 # generated by latex
    31 doc/refrat/refrat.aux
    32 doc/refrat/refrat.bbl
    33 doc/refrat/refrat.blg
    34 doc/refrat/refrat.brf
    35 doc/refrat/refrat.dvi
    36 doc/refrat/refrat.idx
    37 doc/refrat/refrat.ilg
    38 doc/refrat/refrat.ind
    39 doc/refrat/refrat.log
    40 doc/refrat/refrat.out
    41 doc/refrat/refrat.pdf
    42 doc/refrat/refrat.ps
    43 doc/refrat/refrat.toc
  • doc/refrat/Makefile

    r18387ef r76b48f1  
    4242        dvips $< -o $@
    4343
    44 ${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCE} ${basename ${DOCUMENT}}.bbl
     44${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCE} refrat.bbl ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.idx ${basename ${DOCUMENT}}.bbl
    4545        ${LaTeX} ${basename $@}.tex
    4646        if fgrep -s "Label(s) may have changed" ${basename $@}.log ; then ${LaTeX} ${basename $@}.tex ; fi
     
    4949        ${LaTeX} ${basename $@}.tex             % to get index title in toc
    5050
    51 ${basename ${DOCUMENT}}.bbl : ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
    52         if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
     51${basename ${DOCUMENT}}.idx : %.idx : %.tex
     52        if [ ! -r ${basename $@}.ind ] ; then cp /dev/null ${basename $@}.ind ; fi
     53
     54${basename ${DOCUMENT}}.bbl :
    5355        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
    5456        -${BibTeX} ${basename $@}
  • doc/refrat/refrat.tex

    r18387ef r76b48f1  
    1 % requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
    2 
    31\documentclass[openright,twoside]{report}
    42\usepackage{fullpage,times}
     
    5755\def\c11{ISO/IEC C}% cannot have numbers in latex command name
    5856
    59 % replace/adjust characters that look bad in sanserif
    60 \makeatletter
    61 \lst@CCPutMacro
    62 \lst@ProcessOther{"2D}{\lst@ttfamily{-{}}{{\ttfamily\upshape -}}} % replace minus
    63 \lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
    64 \lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
    65 \lst@ProcessOther{"5E}{$\sim$} % circumflex
    66 \lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
    67 \lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
    68 \@empty\z@\@empty
    69 
    70 \newcommand{\Index}{\@ifstar\@sIndex\@Index}
    71 \newcommand{\@Index}[2][\@empty]{\lowercase{\def\temp{#2}}#2\ifx#1\@empty\index{\temp}\else\index{#1@{\protect#2}}\fi}
    72 \newcommand{\@sIndex}[2][\@empty]{#2\ifx#1\@empty\index{#2}\else\index{#1@{\protect#2}}\fi}
    73 \makeatother
    74 
    7557\lstdefinelanguage{CFA}[ANSI]{C}%
    7658  {morekeywords={asm,_Atomic,catch,choose,_Complex,context,dtype,fallthru,forall,ftype,_Imaginary,lvalue,restrict,throw,try,type,},
     
    8971
    9072\setcounter{secnumdepth}{3}     % number subsubsections
    91 \setcounter{tocdepth}{3}                % subsubsections in table of contents
    9273\makeindex
    9374
     
    161142
    162143\CFA's scope rules differ from C's in one major respect: a declaration of an identifier may
    163 overload\index{overloading} outer declarations of lexically identical identifiers in the same
    164 \Index{name space}, instead of hiding them. The outer declaration is hidden if the two declarations
    165 have \Index{compatible type}, or if one declares an array type and the other declares a pointer type
    166 and the element type and pointed-at type are compatible, or if one has function type and the other
    167 is a pointer to a compatible function type, or if one declaration is a \lstinline$type$\use{type} or
    168 \lstinline$typedef$\use{typedef} declaration and the other is not.  The outer declaration becomes
    169 \Index{visible} when the scope of the inner declaration terminates.
     144overload\index{overloading} outer declarations of lexically identical identifiers in the same name
     145space\index{name spaces}, instead of hiding them. The outer declaration is hidden if the two
     146declarations have compatible type\index{compatible type}, or if one declares an array type and the
     147other declares a pointer type and the element type and pointed-at type are compatible, or if one has
     148function type and the other is a pointer to a compatible function type, or if one declaration is a
     149\lstinline$type$\use{type} or \lstinline$typedef$\use{typedef} declaration and the other is not.
     150The outer declaration becomes visible\index{visible} when the scope of the inner declaration
     151terminates.
    170152\begin{rationale}
    171153Hence, a \CFA program can declare an \lstinline$int v$ and a \lstinline$float v$ in the same
     
    174156
    175157
    176 \subsection{Linkage of identifiers}
    177 \index{linkage}
    178 
    179 \CFA's linkage rules differ from C's in only one respect: instances of a particular identifier with
    180 external or internal linkage do not necessarily denote the same object or function. Instead, in the
    181 set of translation units and libraries that constitutes an entire program, any two instances of a
    182 particular identifier with \Index{external linkage} denote the same object or function if they have
    183 \Index{compatible type}s, or if one declares an array type and the other declares a pointer type and
    184 the element type and pointed-at type are compatible, or if one has function type and the other is a
    185 pointer to a compatible function type. Within one translation unit, each instance of an identifier
    186 with \Index{internal linkage} denotes the same object or function in the same circumstances.
    187 Identifiers with \Index{no linkage} always denote unique entities.
     158\subsection{Linkage of identifiers}\index{linkage}
     159
     160\CFA's linkage rules differ from C's in only one respect: instances of a particular identifier
     161with external or internal linkage do not necessarily denote the same object or function. Instead,
     162in the set of translation units and libraries that constitutes an entire program, any two instances
     163of a particular identifier with external linkage\index{external linkage} denote the same object or
     164function if they have compatible types\index{compatible type}, or if one declares an array type and
     165the other declares a pointer type and the element type and pointed-at type are compatible, or if one
     166has function type and the other is a pointer to a compatible function type. Within one translation
     167unit, each instance of an identifier with internal linkage\index{internal linkage} denotes the same
     168object or function in the same circumstances. Identifiers with no linkage\index{no linkage} always
     169denote unique entities.
    188170\begin{rationale}
    189171A \CFA program can declare an \lstinline$extern int v$ and an \lstinline$extern float v$; a C
     
    193175\section{Conversions}
    194176\CFA defines situations where values of one type are automatically converted to another type.
    195 These conversions are called \define{implicit conversion}s. The programmer can request
    196 \define{explicit conversion}s using cast expressions.
     177These conversions are called \define{implicit conversions}. The programmer can request
     178\define{explicit conversions} using cast expressions.
    197179
    198180
     
    202184
    203185\subsubsection{Safe arithmetic conversions}
    204 In C, a pattern of conversions known as the \define{usual arithmetic conversion}s is used with most
     186In C, a pattern of conversions known as the \define{usual arithmetic conversions} is used with most
    205187binary arithmetic operators to convert the operands to a common type and determine the type of the
    206188operator's result. In \CFA, these conversions play a role in overload resolution, and
    207 collectively are called the \define{safe arithmetic conversion}s.
     189collectively are called the \define{safe arithmetic conversions}.
    208190
    209191Let \(int_r\) and \(unsigned_r\) be the signed and unsigned integer types with integer conversion
    210 rank\index{integer conversion rank}\index{rank|see{integer conversion rank}} $r$. Let
     192rank\index{integer conversion rank} \index{rank|see{integer conversion rank}} $r$. Let
    211193\(unsigned_{mr}\) be the unsigned integer type with maximal rank.
    212194
     
    214196\begin{itemize}
    215197\item
    216 The \Index{integer promotion}s.
     198The integer promotions\index{integer promotions}.
    217199
    218200\item
     
    252234
    253235\begin{rationale}
    254 Note that {\c11} does not include conversion from \Index{real type}s to \Index{complex type}s in the
    255 usual arithmetic conversions, and \CFA does not include them as safe conversions.
     236Note that {\c11} does not include conversion from real types\index{real type} to complex
     237types\index{complex type} in the usual arithmetic conversions, and \CFA does not include them as
     238safe conversions.
    256239\end{rationale}
    257240
     
    265248
    266249If an expression's type is a pointer to a structure or union type that has a member that is an
    267 \Index{anonymous structure} or an \Index{anonymous union}, it can be implicitly
    268 converted\index{implicit conversion} to a pointer to the anonymous structure's or anonymous union's
    269 type. The result of the conversion is a pointer to the member.
     250anonymous structure\index{anonymous structure} or an anonymous union\index{anonymous union}, it can
     251be implicitly converted\index{implicit conversions} to a pointer to the anonymous structure's or
     252anonymous union's type. The result of the conversion is a pointer to the member.
    270253
    271254\examples
     
    290273
    291274\subsubsection{Specialization}
    292 A function or value whose type is polymorphic may be implicitly converted to one whose type is
    293 \Index{less polymorphic} by binding values to one or more of its \Index{inferred parameter}. Any
    294 value that is legal for the inferred parameter may be used, including other inferred parameters.
    295 
    296 If, after the inferred parameter binding, an \Index{assertion parameter} has no inferred parameters
    297 in its type, then an object or function must be visible at the point of the specialization that has
    298 the same identifier as the assertion parameter and has a type that is compatible\index{compatible
    299   type} with or can be specialized to the type of the assertion parameter.  The assertion parameter
    300 is bound to that object or function.
     275A function or value whose type is polymorphic may be implicitly converted to one whose type is less
     276polymorphic\index{less polymorphic} by binding values to one or more of its inferred
     277parameters\index{inferred parameter}. Any value that is legal for the inferred parameter may be
     278used, including other inferred parameters.
     279
     280If, after the inferred parameter binding, an assertion parameter\index{assertion parameters} has no
     281inferred parameters in its type, then an object or function must be visible at the point of the
     282specialization that has the same identifier as the assertion parameter and has a type that is
     283compatible\index{compatible type} with or can be specialized to the type of the assertion parameter.
     284The assertion parameter is bound to that object or function.
    301285
    302286The type of the specialization is the type of the original with the bound inferred parameters and
     
    341325\item
    342326from a pointer to a structure or union type to a pointer to the type of a member of the structure or
    343 union that is an \Index{anonymous structure} or an \Index{anonymous union};
    344 \item
    345 within the scope of an initialized \Index{type declaration}, conversions between a type and its
    346 implementation or between a pointer to a type and a pointer to its implementation.
     327union that is an anonymous structure\index{anonymous structure} or an anonymous
     328union\index{anonymous union};
     329\item
     330within the scope of an initialized type declaration\index{type declaration}, conversions between a
     331type and its implementation or between a pointer to a type and a pointer to its implementation.
    347332\end{itemize}
    348333
    349 Conversions that are not safe conversions are \define{unsafe conversion}s.
     334Conversions that are not safe conversions are \define{unsafe conversions}.
    350335\begin{rationale}
    351336As in C, there is an implicit conversion from \lstinline$void *$ to any pointer type. This is
     
    358343\subsection{Conversion cost}
    359344
    360 The \define{conversion cost} of a safe\index{safe conversion}
    361 conversion\footnote{Unsafe\index{unsafe conversion} conversions do not have defined conversion
     345The \define{conversion cost} of a safe\index{safe conversions}
     346conversion\footnote{Unsafe\index{unsafe conversions} conversions do not have defined conversion
    362347costs.} is a measure of how desirable or undesirable it is. It is defined as follows.
    363348\begin{itemize}
     
    410395\subsection{Identifiers}
    411396
    412 \CFA allows operator \Index{overloading} by associating operators with special function
    413 identifiers. Furthermore, the constants ``\lstinline$0$'' and ``\lstinline$1$'' have special status
    414 for many of C's data types (and for many programmer-defined data types as well), so \CFA treats them
    415 as overloadable identifiers. Programmers can use these identifiers to declare functions and objects
    416 that implement operators and constants for their own types.
     397\CFA allows operator overloading\index{overloading} by associating operators with special
     398function identifiers. Furthermore, the constants ``\lstinline$0$'' and ``\lstinline$1$'' have
     399special status for many of C's data types (and for many programmer-defined data types as well), so
     400\CFA treats them as overloadable identifiers. Programmers can use these identifiers to declare
     401functions and objects that implement operators and constants for their own types.
    417402
    418403
     
    576561
    577562\section{Expressions}
    578 
    579563\CFA allows operators and identifiers to be overloaded. Hence, each expression can have a number
    580 of \define{interpretation}s, each of which has a different type. The interpretations that are
    581 potentially executable are called \define{valid interpretation}s. The set of interpretations
     564of \define{interpretations}, each of which has a different type. The interpretations that are
     565potentially executable are called \define{valid interpretations}. The set of interpretations
    582566depends on the kind of expression and on the interpretations of the subexpressions that it contains.
    583567The rules for determining the valid interpretations of an expression are discussed below for each
     
    591575
    592576The \define{best valid interpretations} are the valid interpretations that use the fewest
    593 unsafe\index{unsafe conversion} conversions. Of these, the best are those where the functions and
     577unsafe\index{unsafe conversions} conversions. Of these, the best are those where the functions and
    594578objects involved are the least polymorphic\index{less polymorphic}. Of these, the best have the
    595 lowest total \Index{conversion cost}, including all implicit conversions in the argument
    596 expressions. Of these, the best have the highest total conversion cost for the implicit conversions
    597 (if any) applied to the argument expressions. If there is no single best valid interpretation, or if
    598 the best valid interpretation is ambiguous, then the resulting interpretation is
    599 ambiguous\index{ambiguous interpretation}.
     579lowest total conversion cost\index{conversion cost}, including all implicit conversions in the
     580argument expressions. Of these, the best have the highest total conversion cost for the implicit
     581conversions (if any) applied to the argument expressions. If there is no single best valid
     582interpretation, or if the best valid interpretation is ambiguous, then the resulting interpretation
     583is ambiguous\index{ambiguous interpretation}.
    600584
    601585\begin{rationale}
     
    611595The ``least polymorphic'' rule reduces the number of polymorphic function calls, since such
    612596functions are presumably more expensive than monomorphic functions and since the more specific
    613 function is presumably more appropriate. It also gives preference to monomorphic values (such as the
    614 \lstinline$int$ \lstinline$0$) over polymorphic values (such as the \Index{null pointer}
    615 \lstinline$0$\use{0}). However, interpretations that call polymorphic functions are preferred to
    616 interpretations that perform unsafe conversions, because those conversions potentially lose accuracy
    617 or violate strong typing.
     597function is presumably more appropriate. It also gives preference to monomorphic values (such as
     598the \lstinline$int$ \lstinline$0$) over polymorphic values (such as the null pointer
     599\lstinline$0$)\use{0}\index{null pointer}. However, interpretations that call polymorphic functions
     600are preferred to interpretations that perform unsafe conversions, because those conversions
     601potentially lose accuracy or violate strong typing.
    618602
    619603There are two notable differences between \CFA's overload resolution rules and the rules for
     
    630614by \define{rewrite rules}. Each operator has a set of predefined functions that overload its
    631615identifier. Overload resolution determines which member of the set is executed in a given
    632 expression. The functions have \Index{internal linkage} and are implicitly declared with \Index{file
    633 scope}. The predefined functions and rewrite rules are discussed below for each of these
    634 operators.
     616expression. The functions have internal linkage\index{internal linkage} and are implicitly declared
     617with file scope\index{file scope}. The predefined functions and rewrite rules are discussed below
     618for each of these operators.
    635619\begin{rationale}
    636620Predefined functions and constants have internal linkage because that simplifies optimization in
     
    645629of its subexpressions, this chapter can be taken as describing an overload resolution algorithm that
    646630uses one bottom-up pass over an expression tree. Such an algorithm was first described (for Ada) by
    647 Baker~\cite{Bak:overload}. It is extended here to handle polymorphic functions and arithmetic
    648 conversions. The overload resolution rules and the predefined functions have been chosen so that, in
    649 programs that do not introduce overloaded declarations, expressions will have the same meaning in C
    650 and in \CFA.
     631Baker \cite{Bak:overload}. It is extended here to handle polymorphic functions and arithmetic
     632conversions. The overload resolution rules and the predefined functions have been chosen so that,
     633in programs that do not introduce overloaded declarations, expressions will have the same meaning in
     634C and in \CFA.
    651635\end{rationale}
    652636
     
    657641\end{rationale}
    658642
    659 
    660643\subsection{Primary expressions}
    661 
    662644\begin{syntax}
    663645\lhs{primary-expression}
     
    678660
    679661\semantics
    680 The \Index{valid interpretation} of an \nonterm{identifier} are given by the visible\index{visible}
    681 declarations of the identifier.
     662The valid interpretations\index{valid interpretations} of an \nonterm{identifier} are given by the
     663visible\index{visible} declarations of the identifier.
    682664
    683665A \nonterm{constant} or \nonterm{string-literal} has one valid interpretation, which has the type
     
    720702\end{rationale}
    721703
    722 
    723704\subsubsection{Generic selection}
    724 
    725705\constraints The best interpretation of the controlling expression shall be
    726706unambiguous\index{ambiguous interpretation}, and shall have type compatible with at most one of the
     
    762742\end{lstlisting}
    763743
    764 
    765744\subsubsection{Array subscripting}
    766 
    767745\begin{lstlisting}
    768746forall( type T ) lvalue T ?[?]( T *, ptrdiff_t );@\use{ptrdiff_t}@
     
    816794
    817795Each combination of function designators and argument interpretations is considered. For those
    818 interpretations of the \nonterm{postfix-expression} that are \Index{monomorphic function}
    819 designators, the combination has a \Index{valid interpretation} if the function designator accepts
    820 the number of arguments given, and each argument interpretation matches the corresponding explicit
    821 parameter:
     796interpretations of the \nonterm{postfix-expression} that are monomorphic\index{monomorphic function}
     797function designators, the combination has a valid interpretation\index{valid interpretations} if the
     798function designator accepts the number of arguments given, and each argument interpretation matches
     799the corresponding explicit parameter:
    822800\begin{itemize}
    823801\item
     
    827805\item
    828806if the function designator's type does not include a prototype or if the argument corresponds to
    829 ``\lstinline$...$'' in a prototype, a \Index{default argument promotion} is applied to it.
     807``\lstinline$...$'' in a prototype, a default argument promotion\index{default argument promotions}
     808is applied to it.
    830809\end{itemize}
    831810The type of the valid interpretation is the return type of the function designator.
    832811
    833812For those combinations where the interpretation of the \nonterm{postfix-expression} is a
    834 \Index{polymorphic function} designator and the function designator accepts the number of arguments
    835 given, there shall be at least one set of \define{implicit argument}s for the implicit parameters
    836 such that
     813polymorphic\index{polymorphic function} function designator and the function designator accepts the
     814number of arguments given, there shall be at least one set of \define{implicit arguments} for the
     815implicit parameters such that
    837816\begin{itemize}
    838817\item
    839 If the declaration of the implicit parameter uses \Index{type-class} \lstinline$type$\use{type}, the
    840 implicit argument must be an object type; if it uses \lstinline$dtype$, the implicit argument must
    841 be an object type or an incomplete type; and if it uses \lstinline$ftype$, the implicit argument
    842 must be a function type.
     818If the declaration of the implicit parameter uses type-class\index{type-class}
     819\lstinline$type$\use{type}, the implicit argument must be an object type; if it uses
     820\lstinline$dtype$, the implicit argument must be an object type or an incomplete type; and if it
     821uses \lstinline$ftype$, the implicit argument must be a function type.
    843822
    844823\item
    845824if an explicit parameter's type uses any implicit parameters, then the corresponding explicit
    846 argument must have a type that is (or can be safely converted\index{safe conversion} to) the type
     825argument must have a type that is (or can be safely converted\index{safe conversions} to) the type
    847826produced by substituting the implicit arguments for the implicit parameters in the explicit
    848827parameter type.
     
    853832
    854833\item
    855 for each \Index{assertion parameter} in the function designator's type, there must be an object or
    856 function with the same identifier that is visible at the call site and whose type is compatible with
    857 or can be specialized to the type of the assertion declaration.
     834for each assertion parameter\index{assertion parameters} in the function designator's type, there
     835must be an object or function with the same identifier that is visible at the call site and whose
     836type is compatible with or can be specialized to the type of the assertion declaration.
    858837\end{itemize}
    859838There is a valid interpretation for each such set of implicit parameters. The type of each valid
     
    869848Every set of valid interpretations that have mutually compatible\index{compatible type} result types
    870849also produces an interpretation of the function call expression. The type of the interpretation is
    871 the \Index{composite type} of the types of the valid interpretations, and the value of the
    872 interpretation is that of the \Index{best valid interpretation}.
     850the composite\index{composite type} type of the types of the valid interpretations, and the value of
     851the interpretation is that of the best valid interpretation\index{best valid interpretations}.
    873852\begin{rationale}
    874853One desirable property of a polymorphic programming language is \define{generalizability}: the
     
    879858
    880859\CFA\index{deficiencies!generalizability} does not fully possess this property, because
    881 \Index{unsafe conversion} are not done when arguments are passed to polymorphic parameters.
    882 Consider
     860unsafe\index{unsafe conversions} conversions are not done when arguments are passed to polymorphic
     861parameters. Consider
    883862\begin{lstlisting}
    884863float g( float, float );
     
    981960r( 0 );
    982961\end{lstlisting}
    983 The \lstinline$int 0$ could be passed to (8), or the \lstinline$(void *)$ \Index{specialization} of
    984 the null pointer\index{null pointer} \lstinline$0$\use{0} could be passed to (9). The former is
    985 chosen because the \lstinline$int$ \lstinline$0$ is \Index{less polymorphic}. For
    986 the same reason, \lstinline$int$ \lstinline$0$ is passed to \lstinline$r()$, even though it has
    987 \emph{no} declared parameter types.
     962The \lstinline$int 0$ could be passed to (8), or the \lstinline$(void *)$
     963specialization\index{specialization} of the null pointer\index{null pointer} \lstinline$0$\use{0}
     964could be passed to (9). The former is chosen because the \lstinline$int$ \lstinline$0$ is less
     965polymorphic\index{less polymorphic}. For the same reason, \lstinline$int$ \lstinline$0$ is passed
     966to \lstinline$r()$, even though it has \emph{no} declared parameter types.
    988967
    989968
     
    993972least one interpretation of \lstinline$s$ whose type is a structure type or union type containing a
    994973member named \lstinline$m$. If two or more interpretations of \lstinline$s$ have members named
    995 \lstinline$m$ with mutually compatible types, then the expression has an \Index{ambiguous
    996 interpretation} whose type is the composite type of the types of the members. If an interpretation
    997 of \lstinline$s$ has a member \lstinline$m$ whose type is not compatible with any other
    998 \lstinline$s$'s \lstinline$m$, then the expression has an interpretation with the member's type. The
    999 expression has no other interpretations.
     974\lstinline$m$ with mutually compatible types, then the expression has an ambiguous
     975interpretation\index{ambiguous interpretation} whose type is the composite type of the types of the
     976members. If an interpretation of \lstinline$s$ has a member \lstinline$m$ whose type is not
     977compatible with any other \lstinline$s$'s \lstinline$m$, then the expression has an interpretation
     978with the member's type. The expression has no other interpretations.
    1000979
    1001980The expression ``\lstinline$p->m$'' has the same interpretations as the expression
     
    11681147\begin{lstlisting}
    11691148X ?++( volatile X * ), ?++( _Atomic volatile X * ),
    1170   ?--( volatile X * ), ?--( _Atomic volatile X * );
     1149 ?--( volatile X * ), ?--( _Atomic volatile X * );
    11711150\end{lstlisting}
    11721151For every complete enumerated type \lstinline$E$ there exist
     
    11741153\begin{lstlisting}
    11751154E ?++( volatile E * ), ?++( _Atomic volatile E * ),
    1176   ?--( volatile E * ), ?--( _Atomic volatile E * );
     1155 ?--( volatile E * ), ?--( _Atomic volatile E * );
    11771156\end{lstlisting}
    11781157
     
    11951174First, each interpretation of the operand of an increment or decrement expression is considered
    11961175separately. For each interpretation that is a bit-field or is declared with the
    1197 \lstinline$register$\index{register@{\lstinline$register$}} \index{Itorage-class specifier}, the
    1198 expression has one valid interpretation, with the type of the operand, and the expression is
    1199 ambiguous if the operand is.
     1176\lstinline$register$\index{register@{\lstinline$register$}} storage-class
     1177specifier\index{storage-class specifier}, the expression has one valid interpretation, with the type
     1178of the operand, and the expression is ambiguous if the operand is.
    12001179
    12011180For the remaining interpretations, the expression is rewritten, and the interpretations of the
     
    15441523\constraints
    15451524The operand of the unary ``\lstinline$&$'' operator shall have exactly one
    1546 \Index{interpretation}\index{ambiguous interpretation}, which shall be unambiguous.
     1525interpretation\index{ambiguous interpretation}\index{interpretations}, which shall be unambiguous.
    15471526
    15481527\semantics
     
    16171596forall( ftype FT ) int !?( FT * );
    16181597\end{lstlisting}
    1619 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    1620 rank of \lstinline$int$ there exist
     1598For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     1599rank}greater than the rank of \lstinline$int$ there exist
    16211600% Don't use predefined: keep this out of prelude.cf.
    16221601\begin{lstlisting}
     
    16811660
    16821661
    1683 \subsubsection{The \lstinline$sizeof$ and \lstinline$_Alignof$ operators}
     1662\subsubsection{The {\tt sizeof} and {\tt \_Alignof} operators}
    16841663
    16851664\constraints
     
    16881667
    16891668When the \lstinline$sizeof$\use{sizeof} operator is applied to an expression, the expression shall
    1690 have exactly one \Index{interpretation}\index{ambiguous interpretation}, which shall
     1669have exactly one interpretation\index{ambiguous interpretation}\index{interpretations}, which shall
    16911670be unambiguous. \semantics A \lstinline$sizeof$ or \lstinline$_Alignof$ expression has one
    16921671interpretation, of type \lstinline$size_t$.
     
    17181697\end{rationale}
    17191698
    1720 
    17211699\subsection{Cast operators}
    1722 
    17231700\begin{syntax}
    17241701\lhs{cast-expression}
     
    17331710\semantics
    17341711
    1735 In a \Index{cast expression} ``\lstinline$($\nonterm{type-name}\lstinline$)e$'', if
    1736 \nonterm{type-name} is the type of an interpretation of \lstinline$e$, then that interpretation is
    1737 the only interpretation of the cast expression; otherwise, \lstinline$e$ shall have some
    1738 interpretation that can be converted to \nonterm{type-name}, and the interpretation of the cast
    1739 expression is the cast of the interpretation that can be converted at the lowest cost. The cast
    1740 expression's interpretation is ambiguous\index{ambiguous interpretation} if more than one
    1741 interpretation can be converted at the lowest cost or if the selected interpretation is ambiguous.
     1712In a cast expression\index{cast expression} ``\lstinline$($\nonterm{type-name}\lstinline$)e$'', if
     1713\nonterm{type-name} is the type of an interpretation of \lstinline$e$, then that interpretation is the
     1714only interpretation of the cast expression; otherwise, \lstinline$e$ shall have some interpretation that
     1715can be converted to \nonterm{type-name}, and the interpretation of the cast expression is the cast
     1716of the interpretation that can be converted at the lowest cost. The cast expression's interpretation
     1717is ambiguous\index{ambiguous interpretation} if more than one interpretation can be converted at the
     1718lowest cost or if the selected interpretation is ambiguous.
    17421719
    17431720\begin{rationale}
     
    17461723\end{rationale}
    17471724
    1748 
    17491725\subsection{Multiplicative operators}
    1750 
    17511726\begin{syntax}
    17521727\lhs{multiplicative-expression}
     
    18081783        ?/?( _Complex long double, _Complex long double );
    18091784\end{lstlisting}
    1810 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    1811 rank of \lstinline$int$ there exist
     1785For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     1786rank}greater than the rank of \lstinline$int$ there exist
    18121787% Don't use predefined: keep this out of prelude.cf.
    18131788\begin{lstlisting}
     
    18161791
    18171792\begin{rationale}
    1818 {\c11} does not include conversions from the \Index{real type}s to \Index{complex type}s in the
    1819 \Index{usual arithmetic conversion}s.  Instead it specifies conversion of the result of binary
    1820 operations on arguments from mixed type domains. \CFA's predefined operators match that pattern.
     1793{\c11} does not include conversions from the real types\index{real type} to complex
     1794types\index{complex type} in the usual arithmetic conversions\index{usual arithmetic conversions}.
     1795Instead it specifies conversion of the result of binary operations on arguments from mixed type
     1796domains. \CFA's predefined operators match that pattern.
    18211797\end{rationale}
    18221798
     
    18531829
    18541830\begin{rationale}
    1855 {\c11} defines most arithmetic operations to apply an \Index{integer promotion} to any argument that
    1856 belongs to a type that has an \Index{integer conversion rank} less than that of \lstinline$int$.If
    1857 \lstinline$s$ is a \lstinline$short int$, ``\lstinline$s *s$'' does not have type \lstinline$short int$;
    1858 it is treated as ``\lstinline$( (int)s ) * ( (int)s )$'', and has type \lstinline$int$. \CFA matches
    1859 that pattern; it does not predefine ``\lstinline$short ?*?( short, short )$''.
     1831{\c11} defines most arithmetic operations to apply an integer promotion\index{integer promotions} to
     1832any argument that belongs to a type that has an integer conversion rank\index{integer conversion
     1833 rank} less than that of \lstinline$int$.If \lstinline$s$ is a \lstinline$short int$,
     1834``\lstinline$s *s$'' does not have type \lstinline$short int$; it is treated as
     1835``\lstinline$( (int)s ) * ( (int)s )$'', and has type \lstinline$int$. \CFA matches that pattern;
     1836it does not predefine ``\lstinline$short ?*?( short, short )$''.
    18601837
    18611838These ``missing'' operators limit polymorphism. Consider
     
    20091986        * ?-?( _Atomic const restrict volatile T *, _Atomic const restrict volatile T * );
    20101987\end{lstlisting}
    2011 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2012 rank of \lstinline$int$ there exist
     1988For every extended integer type \lstinline$X$ with integer conversion rank
     1989\index{integer conversion rank}greater than the rank of \lstinline$int$ there
     1990exist
    20131991% Don't use predefined: keep this out of prelude.cf.
    20141992\begin{lstlisting}
     
    20612039         ?>>?( long long unsigned int, int);
    20622040\end{lstlisting}
    2063 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2064 rank of \lstinline$int$ there exist
     2041For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2042 rank}greater than the rank of \lstinline$int$ there exist
    20652043% Don't use predefined: keep this out of prelude.cf.
    20662044\begin{lstlisting}
     
    20702048\begin{rationale}
    20712049The bitwise shift operators break the usual pattern: they do not convert both operands to a common
    2072 type. The right operand only undergoes \Index{integer promotion}.
     2050type. The right operand only undergoes integer promotion\index{integer promotion}.
    20732051\end{rationale}
    20742052
     
    21452123        ?>=?( _Atomic const restrict volatile DT *, _Atomic const restrict volatile DT * );
    21462124\end{lstlisting}
    2147 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2148 rank of \lstinline$int$ there exist
     2125For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2126 rank}greater than the rank of \lstinline$int$ there exist
    21492127% Don't use predefined: keep this out of prelude.cf.
    21502128\begin{lstlisting}
     
    22482226        ?!=?( forall( ftype FT2) FT2*, forall( ftype FT3) FT3 * );
    22492227\end{lstlisting}
    2250 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2251 rank of \lstinline$int$ there exist
     2228For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2229 rank}greater than the rank of \lstinline$int$ there exist
    22522230% Don't use predefined: keep this out of prelude.cf.
    22532231\begin{lstlisting}
     
    22592237The polymorphic equality operations come in three styles: comparisons between pointers of compatible
    22602238types, between pointers to \lstinline$void$ and pointers to object types or incomplete types, and
    2261 between the \Index{null pointer} constant and pointers to any type. In the last case, a special
    2262 constraint rule for null pointer constant operands has been replaced by a consequence of the \CFA
    2263 type system.
     2239between the null pointer constant\index{null pointer} and pointers to any type. In the last case, a
     2240special constraint rule for null pointer constant operands has been replaced by a consequence of the
     2241\CFA type system.
    22642242\end{rationale}
    22652243
     
    23002278long long unsigned int ?&?( long long unsigned int, long long unsigned int );
    23012279\end{lstlisting}
    2302 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2303 rank of \lstinline$int$ there exist
     2280For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2281rank}greater than the rank of \lstinline$int$ there exist
    23042282% Don't use predefined: keep this out of prelude.cf.
    23052283\begin{lstlisting}
     
    23332311long long unsigned int ?^?( long long unsigned int, long long unsigned int );
    23342312\end{lstlisting}
    2335 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2336 rank of \lstinline$int$ there exist
     2313For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2314 rank}greater than the rank of \lstinline$int$ there exist
    23372315% Don't use predefined: keep this out of prelude.cf.
    23382316\begin{lstlisting}
     
    23662344long long unsigned int ?|?( long long unsigned int, long long unsigned int );
    23672345\end{lstlisting}
    2368 For every extended integer type \lstinline$X$ with \Index{integer conversion rank} greater than the
    2369 rank of \lstinline$int$ there exist
     2346For every extended integer type \lstinline$X$ with integer conversion rank \index{integer conversion
     2347rank}greater than the rank of \lstinline$int$ there exist
    23702348% Don't use predefined: keep this out of prelude.cf.
    23712349\begin{lstlisting}
     
    25242502
    25252503\begin{rationale}
    2526 The object of the above is to apply the \Index{usual arithmetic conversion}s when the second and
    2527 third operands have arithmetic type, and to combine the qualifiers of the second and third operands
    2528 if they are pointers.
     2504The object of the above is to apply the usual arithmetic conversions\index{usual arithmetic
     2505conversions} when the second and third operands have arithmetic type, and to combine the
     2506qualifiers of the second and third operands if they are pointers.
    25292507\end{rationale}
    25302508
     
    31943172
    31953173\constraints
    3196 If an identifier has \Index{no linkage}, there shall be no more than one declaration of the
    3197 identifier ( in a declarator or type specifier ) with compatible types in the same scope and in the
    3198 same name space, except that:
     3174If an identifier has no linkage\index{no linkage}, there shall be no more than one declaration of
     3175the identifier ( in a declarator or type specifier ) with compatible types in the same scope and in
     3176the same name space, except that:
    31993177\begin{itemize}
    32003178\item
     
    32983276\semantics
    32993277The \nonterm{type-parameter-list}s and assertions of the \nonterm{forall-specifier}s declare type
    3300 identifiers, function and object identifiers with \Index{no linkage}.
     3278identifiers, function and object identifiers with no linkage\index{no linkage}.
    33013279
    33023280If, in the declaration ``\lstinline$T D1$'', \lstinline$T$ contains \nonterm{forall-specifier}s and
     
    33063284\end{lstlisting}
    33073285then a type identifier declared by one of the \nonterm{forall-specifier}s is an \define{inferred
    3308 parameter} of the function declarator if and only if it is not an inferred parameter of a function
     3286 parameter} of the function declarator if and only if it is not an inferred parameter of a function
    33093287declarator in \lstinline$D$, and it is used in the type of a parameter in the following
    33103288\nonterm{type-parameter-list} or it and an inferred parameter are used as arguments of a
    3311 \Index{specification} in one of the \nonterm{forall-specifier}s. The identifiers declared by
    3312 assertions that use an inferred parameter of a function declarator are \Index{assertion parameter}s
    3313 of that function declarator.
     3289specification\index{specification} in one of the \nonterm{forall-specifier}s. The identifiers
     3290declared by assertions that use an inferred parameter of a function declarator are assertion
     3291parameters\index{assertion parameters} of that function declarator.
    33143292\begin{rationale}
    33153293Since every inferred parameter is used by some parameter, inference can be understood as a single
     
    33343312
    33353313If a function declarator is part of a function definition, its inferred parameters and assertion
    3336 parameters have \Index{block scope}; otherwise, identifiers declared by assertions have a
     3314parameters have block scope\index{block scope}; otherwise, identifiers declared by assertions have a
    33373315\define{declaration scope}, which terminates at the end of the \nonterm{declaration}.
    33383316
     
    33483326and $g$ in their order of occurance in the function types' \nonterm{parameter-type-list}s. Let $f'$
    33493327be $f$ with every occurrence of $f_i$ replaced by $g_i$, for all $i$. Then $f$ and $g$ are
    3350 \Index{compatible type}s if $f'$'s and $g$'s return types and parameter lists are compatible, and if
    3351 for every assertion parameter of $f'$ there is an assertion parameter in $g$ with the same
    3352 identifier and compatible type, and vice versa.
     3328compatible types\index{compatible type} if $f'$'s and $g$'s return types and parameter lists are
     3329compatible, and if for every assertion parameter of $f'$ there is an assertion parameter in $g$ with
     3330the same identifier and compatible type, and vice versa.
    33533331
    33543332\examples
     
    34603438\lstinline$lvalue$ may be used to qualify the return type of a function type. Let \lstinline$T$ be
    34613439an unqualified version of a type; then the result of calling a function with return type
    3462 \lstinline$lvalue T$ is a \Index{modifiable lvalue} of type \lstinline$T$.
     3440\lstinline$lvalue T$ is a modifiable lvalue\index{modifiable lvalue} of type \lstinline$T$.
    34633441\lstinline$const$\use{const} and \lstinline$volatile$\use{volatile} qualifiers may also be added to
    34643442indicate that the function result is a constant or volatile lvalue.
     
    34683446\end{rationale}
    34693447
    3470 An {lvalue}-qualified type may be used in a \Index{cast expression} if the operand is an lvalue; the
    3471 result of the expression is an lvalue.
     3448An {lvalue}-qualified type may be used in a cast expression\index{cast expression} if the operand is
     3449an lvalue; the result of the expression is an lvalue.
    34723450
    34733451\begin{rationale}
     
    35123490
    35133491\item
    3514 References to \Index{const-qualified} types can be used instead of value parameters.  Given the
    3515 {\CC} function call ``\lstinline$fiddle( a_thing )$'', where the type of \lstinline$a_thing$ is
    3516 \lstinline$Thing$, the type of \lstinline$fiddle$ could be either of
     3492References to const-qualified\index{const-qualified} types can be used instead of value parameters.
     3493Given the {\CC} function call ``\lstinline$fiddle( a_thing )$'', where the type of
     3494\lstinline$a_thing$ is \lstinline$Thing$, the type of \lstinline$fiddle$ could be either of
    35173495\begin{lstlisting}
    35183496void fiddle( Thing );
     
    35473525object being initialized. An expression used in an \nonterm{initializer-list} is treated as being
    35483526cast to the type of the aggregate member that it initializes. In either case the cast must have a
    3549 single unambiguous \Index{interpretation}.
     3527single unambiguous interpretation\index{interpretations}.
    35503528
    35513529
     
    35693547\begin{rationale}
    35703548The declarations allowed in a specification are much the same as those allowed in a structure,
    3571 except that bit fields are not allowed, and \Index{incomplete type}s and function types are allowed.
     3549except that bit fields are not allowed, and incomplete types\index{incomplete types} and function
     3550types are allowed.
    35723551\end{rationale}
    35733552
     
    35843563
    35853564\subsubsection{Assertions}
    3586 
    35873565\begin{syntax}
    35883566\lhs{assertion-list}
     
    36023580each \nonterm{type-parameter} in that specification's \nonterm{spec-parameter-list}. If the
    36033581\nonterm{type-parameter} uses type-class \lstinline$type$\use{type}, the argument shall be the type
    3604 name of an \Index{object type}; if it uses \lstinline$dtype$, the argument shall be the type name of
    3605 an object type or an \Index{incomplete type}; and if it uses \lstinline$ftype$, the argument shall
    3606 be the type name of a \Index{function type}.
     3582name of an object type\index{object types}; if it uses \lstinline$dtype$, the argument shall be the
     3583type name of an object type or an incomplete type\index{incomplete types}; and if it uses
     3584\lstinline$ftype$, the argument shall be the type name of a function type\index{function types}.
    36073585
    36083586\semantics
     
    36173595combining the declarations produced by each assertion. If the collection contains two declarations
    36183596that declare the same identifier and have compatible types, they are combined into one declaration
    3619 with the \Index{composite type} constructed from the two types.
     3597with the composite type\index{composite type} constructed from the two types.
    36203598
    36213599\examples
     
    36523630\end{lstlisting}
    36533631
    3654 
    36553632\subsection{Type declarations}
    3656 
    36573633\begin{syntax}
    36583634\lhs{type-parameter-list}
     
    36803656
    36813657\semantics
    3682 A \nonterm{type-parameter} or a \nonterm{type-declarator} declares an identifier to be a \Index{type
    3683 name} for a type incompatible with all other types.
    3684 
    3685 An identifier declared by a \nonterm{type-parameter} has \Index{no linkage}. Identifiers declared
    3686 with type-class \lstinline$type$\use{type} are \Index{object type}s; those declared with type-class
    3687 \lstinline$dtype$\use{dtype} are \Index{incomplete type}s; and those declared with type-class
    3688 \lstinline$ftype$\use{ftype} are \Index{function type}s. The identifier has \Index{block scope} that
    3689 terminates at the end of the \nonterm{spec-declaration-list} or polymorphic function that contains
    3690 the \nonterm{type-parameter}.
    3691 
    3692 A \nonterm{type-declarator} with an \Index{initializer} is a \define{type definition}.  The declared
    3693 identifier is an \Index{incomplete type} within the initializer, and an \Index{object type} after
    3694 the end of the initializer. The type in the initializer is called the \define{implementation
    3695   type}. Within the scope of the declaration, \Index{implicit conversion}s can be performed between
    3696 the defined type and the implementation type, and between pointers to the defined type and pointers
    3697 to the implementation type.
    3698 
    3699 A type declaration without an \Index{initializer} and without a \Index{storage-class specifier} or
    3700 with storage-class specifier \lstinline$static$\use{static} defines an \Index{incomplete type}. If a
    3701 \Index{translation unit} or \Index{block} contains one or more such declarations for an identifier,
    3702 it must contain exactly one definition of the identifier ( but not in an enclosed block, which would
    3703 define a new type known only within that block).
     3658A \nonterm{type-parameter} or a \nonterm{type-declarator} declares an identifier to be a type
     3659name\index{type names} for a type incompatible with all other types.
     3660
     3661An identifier declared by a \nonterm{type-parameter} has no linkage\index{no linkage}. Identifiers
     3662declared with type-class \lstinline$type$\use{type} are object types\index{object types}; those
     3663declared with type-class \lstinline$dtype$\use{dtype} are incomplete types\index{incomplete types};
     3664and those declared with type-class \lstinline$ftype$\use{ftype} are function types\index{function
     3665 types}. The identifier has block scope\index{block scope} that terminates at the end of the
     3666\nonterm{spec-declaration-list} or polymorphic function that contains the \nonterm{type-parameter}.
     3667
     3668A \nonterm{type-declarator} with an initializer\index{initializer} is a \define{type definition}.
     3669The declared identifier is an incomplete type\index{incomplete types} within the initializer, and an
     3670object type\index{object types} after the end of the initializer. The type in the initializer is
     3671called the \define{implementation type}. Within the scope of the declaration, implicit
     3672conversions\index{implicit conversions} can be performed between the defined type and the
     3673implementation type, and between pointers to the defined type and pointers to the implementation
     3674type.
     3675
     3676A type declaration without an initializer\index{initializer} and without a storage-class
     3677specifier\index{storage-class specifiers} or with storage-class specifier
     3678\lstinline$static$\use{static} defines an incomplete type\index{incomplete types}. If a translation
     3679unit\index{translation unit} or block \index{block} contains one or more such declarations for an
     3680identifier, it must contain exactly one definition of the identifier ( but not in an enclosed block,
     3681which would define a new type known only within that block).
    37043682\begin{rationale}
    37053683Incomplete type declarations allow compact mutually-recursive types.
     
    37203698\end{rationale}
    37213699
    3722 A type declaration without an initializer and with \Index{storage-class specifier}
    3723 \lstinline$extern$\use{extern} is an \define{opaque type declaration}. Opaque types are
    3724 \Index{object type}s. An opaque type is not a \nonterm{constant-expression}; neither is a structure
    3725 or union that has a member whose type is not a \nonterm{constant-expression}.  Every other
    3726 \Index{object type} is a \nonterm{constant-expression}. Objects with static storage duration shall
    3727 be declared with a type that is a \nonterm{constant-expression}.
     3700A type declaration without an initializer and with storage-class specifier \index{storage-class
     3701 specifiers} \lstinline$extern$\use{extern} is an \define{opaque type declaration}. Opaque types
     3702are object types\index{object types}. An opaque type is not a \nonterm{constant-expression};
     3703neither is a structure or union that has a member whose type is not a \nonterm{constant-expression}.
     3704Every other object type\index{object types} is a \nonterm{constant-expression}. Objects with static
     3705storage duration shall be declared with a type that is a \nonterm{constant-expression}.
    37283706\begin{rationale}
    37293707Type declarations can declare identifiers with external linkage, whereas typedef declarations
     
    37363714\end{rationale}
    37373715
    3738 An \Index{incomplete type} which is not a qualified version\index{qualified type} of a type is a
    3739 value of \Index{type-class} \lstinline$dtype$. An object type\index{object types} which is not a
    3740 qualified version of a type is a value of type-classes \lstinline$type$ and \lstinline$dtype$. A
    3741 \Index{function type} is a value of type-class \lstinline$ftype$.
     3716An incomplete type\index{incomplete types} which is not a qualified version\index{qualified type} of
     3717a type is a value of type-class\index{type-class} \lstinline$dtype$. An object type\index{object
     3718 types} which is not a qualified version of a type is a value of type-classes \lstinline$type$ and
     3719\lstinline$dtype$. A function type\index{function types} is a value of type-class
     3720\lstinline$ftype$.
    37423721\begin{rationale}
    37433722Syntactically, a type value is a \nonterm{type-name}, which is a declaration for an object which
     
    37733752
    37743753\begin{rationale}
    3775 Since \Index{incomplete type}s are not type values, they can not be used as the initializer in a
    3776 type declaration, or as the type of a structure or union member. This prevents the declaration of
    3777 types that contain each other.
     3754Since incomplete types\index{incomplete types} are not type values, they can not be used as the
     3755initializer in a type declaration, or as the type of a structure or union member. This prevents the
     3756declaration of types that contain each other.
    37783757\begin{lstlisting}
    37793758type t1;
     
    39213900A declaration\index{type declaration} of a type identifier \lstinline$T$ with type-class
    39223901\lstinline$type$ implicitly declares a \define{default assignment} function
    3923 \lstinline$T ?=?( T *, T )$\use{?=?}, with the same \Index{scope} and \Index{linkage} as the
    3924 identifier \lstinline$T$.
     3902\lstinline$T ?=?( T *, T )$\use{?=?}, with the same scope\index{scopes} and linkage\index{linkage} as
     3903the identifier \lstinline$T$.
    39253904\begin{rationale}
    39263905Assignment is central to C's imperative programming style, and every existing C object type has
     
    39333912\end{rationale}
    39343913
    3935 A definition\index{type definition} of a type identifier \lstinline$T$ with \Index{implementation
    3936 type} \lstinline$I$ and type-class \lstinline$type$ implicitly defines a default assignment
    3937 function. A definition\index{type definition} of a type identifier \lstinline$T$ with implementation
    3938 type \lstinline$I$ and an assertion list implicitly defines \define{default function}s and
    3939 \define{default object}s as declared by the assertion declarations. The default objects and
    3940 functions have the same \Index{scope} and \Index{linkage} as the identifier \lstinline$T$. Their
    3941 values are determined as follows:
     3914A definition\index{type definition} of a type identifier \lstinline$T$ with implementation
     3915type\index{implementation type} \lstinline$I$ and type-class \lstinline$type$ implicitly defines a
     3916default assignment function. A definition\index{type definition} of a type identifier \lstinline$T$
     3917with implementation type \lstinline$I$ and an assertion list implicitly defines \define{default
     3918 functions} and \define{default objects} as declared by the assertion declarations. The default
     3919objects and functions have the same scope\index{scopes} and linkage\index{linkage} as the identifier
     3920\lstinline$T$. Their values are determined as follows:
    39423921\begin{itemize}
    39433922\item
     
    40354014
    40364015\section{Statements and blocks}
    4037 
    40384016Many statements contain expressions, which may have more than one interpretation. The following
    4039 sections describe how the \CFA translator selects an interpretation. In all cases the result of the
    4040 selection shall be a single unambiguous \Index{interpretation}.
     4017sections describe how the \CFA translator selects an interpretation. In all cases the result of
     4018the selection shall be a single unambiguous interpretation\index{interpretations}.
    40414019
    40424020
     
    40544032\end{lstlisting}
    40554033may have more than one interpretation, but it shall have only one interpretation with an integral
    4056 type. An \Index{integer promotion} is performed on the expression if necessary.  The constant
    4057 expressions in \lstinline$case$ statements with the switch are converted to the promoted type.
     4034type. An integer promotion\index{integer promotion} is performed on the expression if necessary.
     4035The constant expressions in \lstinline$case$ statements with the switch are converted to the
     4036promoted type.
    40584037
    40594038
     
    41014080\appendix
    41024081
    4103 
    41044082\chapter{Examples}
    4105 
    41064083
    41074084\section{C types}
     
    42064183\end{lstlisting}
    42074184
    4208 Specifications that define the dereference operator ( or subscript operator ) require two
    4209 parameters, one for the pointer type and one for the pointed-at ( or element ) type. Different
    4210 specifications are needed for each set of \Index{type qualifier}s, because qualifiers are not
    4211 included in types. The assertion ``\lstinline$|ptr_to( Safe_pointer, int )$'' should be read as
     4185Specifications that define the dereference operator ( or subscript operator ) require two parameters,
     4186one for the pointer type and one for the pointed-at ( or element ) type. Different specifications are
     4187needed for each set of type qualifiers\index{type qualifiers}, because qualifiers are not included
     4188in types. The assertion ``\lstinline$|ptr_to( Safe_pointer, int )$'' should be read as
    42124189``\lstinline$Safe_pointer$ acts like a pointer to \lstinline$int$''.
    42134190\begin{lstlisting}
Note: See TracChangeset for help on using the changeset viewer.