tmp/tmp4p6cby51/{from.md → to.md}
RENAMED
|
@@ -1,30 +1,36 @@
|
|
| 1 |
### [[lex]]: lexical conventions <a id="diff.lex">[[diff.lex]]</a>
|
| 2 |
|
| 3 |
-
**Change:** New Keywords
|
| 4 |
New keywords are added to C++; see [[lex.key]]. **Rationale:** These
|
| 5 |
keywords were added in order to implement the new semantics of C++.
|
| 6 |
**Effect on original feature:** Change to semantics of well-defined
|
| 7 |
-
feature. Any
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
**Change:** Type of *character-literal* is changed from `int` to `char`.
|
| 13 |
**Rationale:** This is needed for improved overloaded function argument
|
| 14 |
-
type matching.
|
|
|
|
|
|
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
int function( int i );
|
| 18 |
int function( char c );
|
| 19 |
|
| 20 |
function( 'x' );
|
| 21 |
```
|
| 22 |
|
| 23 |
It is preferable that this call match the second version of function
|
| 24 |
-
rather than the first.
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
sizeof('x') == sizeof(int)
|
| 29 |
```
|
| 30 |
|
|
|
|
| 1 |
### [[lex]]: lexical conventions <a id="diff.lex">[[diff.lex]]</a>
|
| 2 |
|
| 3 |
+
**Change:** New Keywords.
|
| 4 |
New keywords are added to C++; see [[lex.key]]. **Rationale:** These
|
| 5 |
keywords were added in order to implement the new semantics of C++.
|
| 6 |
**Effect on original feature:** Change to semantics of well-defined
|
| 7 |
+
feature. Any C programs that used any of these keywords as identifiers
|
| 8 |
+
are not valid C++ programs. Syntactic transformation. Converting one
|
| 9 |
+
specific program is easy. Converting a large collection of related
|
| 10 |
+
programs takes more work. Common.
|
| 11 |
|
| 12 |
**Change:** Type of *character-literal* is changed from `int` to `char`.
|
| 13 |
**Rationale:** This is needed for improved overloaded function argument
|
| 14 |
+
type matching.
|
| 15 |
+
|
| 16 |
+
[*Example 1*:
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
int function( int i );
|
| 20 |
int function( char c );
|
| 21 |
|
| 22 |
function( 'x' );
|
| 23 |
```
|
| 24 |
|
| 25 |
It is preferable that this call match the second version of function
|
| 26 |
+
rather than the first.
|
| 27 |
+
|
| 28 |
+
— *end example*]
|
| 29 |
+
|
| 30 |
+
**Effect on original feature:** Change to semantics of well-defined
|
| 31 |
+
feature. C programs which depend on
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
sizeof('x') == sizeof(int)
|
| 35 |
```
|
| 36 |
|