Skip to content

Instantly share code, notes, and snippets.

@sdutoit
Created October 13, 2013 17:24
Show Gist options
  • Save sdutoit/6964872 to your computer and use it in GitHub Desktop.
Save sdutoit/6964872 to your computer and use it in GitHub Desktop.
Diff for fixes in [diff] by Guilliam Xavier, part 1
diff --git a/source/compatibility.tex b/source/compatibility.tex
index 2cacea2..5746ca4 100644
--- a/source/compatibility.tex
+++ b/source/compatibility.tex
@@ -96,7 +96,7 @@ as pointers to potentially modifiable memory are probably rare.
\rSec2[diff.basic]{Clause \ref{basic}: basic concepts}
\ref{basic.def}
-\change \Cpp does not have ``tentative definitions'' as in C
+\change \Cpp does not have ``tentative definitions'' as in C\\
E.g., at file scope,
\begin{codeblock}
@@ -125,7 +125,6 @@ fundamental types and user-defined types.
Deletion of semantically well-defined feature.
\difficulty
Semantic transformation.
-\rationale
In \Cpp, the initializer for one of a set of
mutually-referential file-local static objects must invoke a function
call to achieve the initialization.
@@ -153,29 +152,29 @@ declared \tcode{extern}, has internal linkage, while in C it would have external
Because \tcode{const} objects can be used as compile-time values in
\Cpp, this feature urges programmers to provide explicit initializer
values for each \tcode{const}.
-This feature allows the user to put \tcode{const}objects in header files that are included
+This feature allows the user to put \tcode{const} objects in header files that are included
in many compilation units.
\effect
Change to semantics of well-defined feature.
\difficulty
-Semantic transformation
+Semantic transformation.
\howwide
-Seldom
+Seldom.
\ref{basic.start}
\change Main cannot be called recursively and cannot have its address taken
\rationale
The main function may require special actions.
\effect
-Deletion of semantically well-defined feature
+Deletion of semantically well-defined feature.
\difficulty
Trivial: create an intermediary function such as
\tcode{mymain(argc, argv)}.
\howwide
-Seldom
+Seldom.
\ref{basic.types}
-\change C allows ``compatible types'' in several places, \Cpp does not
+\change C allows ``compatible types'' in several places, \Cpp does not\\
For example,
otherwise-identical \tcode{struct} types with different tag names
are ``compatible'' in C but are distinctly different types
@@ -249,7 +248,7 @@ widespread commercially.
Common.
\ref{expr.sizeof}, \ref{expr.cast}
-\change Types must be declared in declarations, not in expressions
+\change Types must be declared in declarations, not in expressions\\
In C, a sizeof expression or cast expression may create a new type.
For example,
\begin{codeblock}
@@ -260,7 +259,7 @@ declares a new type, struct x .
This prohibition helps to clarify the location of
declarations in the source code.
\effect
-Deletion of a semantically well-defined feature.
+Deletion of semantically well-defined feature.
\difficulty
Syntactic transformation.
\howwide
@@ -345,7 +344,7 @@ this case.
\rSec2[diff.dcl]{Clause \ref{dcl.dcl}: declarations}
\ref{dcl.stc}
-\change In \Cpp, the \tcode{static} or \tcode{extern} specifiers can only be applied to names of objects or functions
+\change In \Cpp, the \tcode{static} or \tcode{extern} specifiers can only be applied to names of objects or functions\\
Using these specifiers with type declarations is illegal in \Cpp.
In C, these specifiers are ignored when used on type declarations.
@@ -458,7 +457,7 @@ The keyword \tcode{auto} cannot be used as a storage class specifier.
\begin{codeblock}
void f() {
- auto int x; // valid C, invalid C++
+ auto int x; // valid C, invalid \Cpp
}
\end{codeblock}
@@ -656,7 +655,7 @@ inconsistent definitions of template specializations. For consistency,
the implementation freedom was eliminated for non-dependent types,
too.
\effect
-The choise is implementation-defined in C, but not so in C++.
+The choice is implementation-defined in C, but not so in \Cpp.
\difficulty
Syntactic transformation.
\howwide
@@ -685,7 +684,7 @@ be very complicated and \Cpp programmers would be unable to predict
reliably the meanings of nontrivial examples involving nested or
local functions.
\effect
-Change of semantics of well-defined feature.
+Change to semantics of well-defined feature.
\difficulty
Semantic transformation.
To make the struct type name visible in the scope of the enclosing
@@ -745,7 +744,7 @@ For example, the following is valid in ISO C:
\begin{codeblock}
struct X { int i; };
volatile struct X x1 = {0};
-struct X x2(x1); // invalid \Cpp
+struct X x2 = x1; // invalid \Cpp
struct X x3;
x3 = x1; // also invalid \Cpp
\end{codeblock}
@@ -839,7 +838,7 @@ this International Standard, as the following example illustrates.
Previously, \#1 would have consisted of two separate preprocessing tokens and
the macro \tcode{_x} would have been expanded. In this International Standard,
-\#1 consists of a single preprocessing tokens, so the macro is not expanded.
+\#1 consists of a single preprocessing token, so the macro is not expanded.
\ref{lex.key}
\change New keywords
@@ -872,7 +871,7 @@ change from an unsigned integer type to \tcode{signed long long}.
\ref{conv.ptr}
\change Only literals are integer null pointer constants
\rationale Removing surprising interactions with templates and constant
-expressions
+expressions.
\effect Valid \CppIII code may fail to compile or produce different results in
this International Standard, as the following example illustrates:
@@ -986,7 +985,7 @@ International Standard.
\effect
Valid \CppIII code that uses any identifiers added to the \Cpp standard
library by this International Standard may fail to compile or produce different
-results in This International Standard. A comprehensive list of identifiers used
+results in this International Standard. A comprehensive list of identifiers used
by the \Cpp standard library can be found in the Index of Library Names in this
International Standard.
@@ -1200,7 +1199,7 @@ of these functions) will fail to compile with this International Standard.
\change Signature changes: from \tcode{iterator} to \tcode{const_iterator}
parameters
\rationale Overspecification.
-\effects
+\effect
The signatures of the following member functions changed from taking an
\tcode{iterator} to taking a \tcode{const_iterator}:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment