Skip to content

Commit

Permalink
fixup: required to
Browse files Browse the repository at this point in the history
  • Loading branch information
jensmaurer committed Jan 12, 2024
1 parent 176d090 commit 635b1da
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions source/compatibility.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2708,7 +2708,7 @@
\tcode{sizeof(char*)}
in C.
\difficulty
Programs are required to add explicit casts to the appropriate rvalue.
Programs need to add explicit casts to the appropriate rvalue.
\howwide
Rare.

Expand Down Expand Up @@ -2803,7 +2803,7 @@

\diffref{dcl.typedef}
\change
A \Cpp{} \grammarterm{typedef-name} is required to be different from any class type name declared
A \Cpp{} \grammarterm{typedef-name} needs to be different from any class type name declared
in the same scope (except if the typedef is a synonym of the class name with the
same name). In C, a \grammarterm{typedef-name} and a struct tag name declared in the same scope
can have the same name (because they have different name spaces).
Expand Down Expand Up @@ -2836,9 +2836,9 @@

\diffref{dcl.type} [see also \ref{basic.link}]
\change
Const objects are required to be initialized in \Cpp{} but can be left uninitialized in C.
Const objects need to be initialized in \Cpp{} but can be left uninitialized in C.
\rationale
A const object cannot be assigned to so it is required to be initialized
A const object cannot be assigned to so it needs to be initialized
to hold a useful value.
\effect
Deletion of semantically well-defined feature.
Expand Down Expand Up @@ -2973,9 +2973,10 @@

\diffref{dcl.init.string}
\change
In \Cpp{}, when initializing an array of character with a string, the number of
In \Cpp{}, when initializing an array of character with a string,
it is not possible for the number of
characters in the string (including the terminating \tcode{'\textbackslash 0'})
is required not to exceed the
to exceed the
number of elements in the array. In C, an array can be initialized with a string even if
the array is not large enough to contain the string-terminating \tcode{'\textbackslash 0'}.

Expand Down

0 comments on commit 635b1da

Please sign in to comment.