|
2508 | 2508 | Semantic transformation. |
2509 | 2509 | In \Cpp{}, the initializer for one of a set of |
2510 | 2510 | mutually-referential file-local objects with static storage |
2511 | | -duration must invoke a function |
2512 | | -call to achieve the initialization. |
| 2511 | +duration is expected to invoke a function |
| 2512 | +to achieve the initialization. |
2513 | 2513 | \howwide |
2514 | 2514 | Seldom. |
2515 | 2515 |
|
|
2708 | 2708 | \tcode{sizeof(char*)} |
2709 | 2709 | in C. |
2710 | 2710 | \difficulty |
2711 | | -Programs must add explicit casts to the appropriate rvalue. |
| 2711 | +Programs are required to add explicit casts to the appropriate rvalue. |
2712 | 2712 | \howwide |
2713 | 2713 | Rare. |
2714 | 2714 |
|
|
2744 | 2744 | return-value mechanisms for the return of class objects. |
2745 | 2745 | If |
2746 | 2746 | some flow paths execute a return without specifying any value, |
2747 | | -the implementation must embody many more complications. |
| 2747 | +the implementation gets more complicated. |
2748 | 2748 | Besides, |
2749 | 2749 | promising to return a value of a given type, and then not returning |
2750 | 2750 | such a value, has always been recognized to be a questionable |
|
2803 | 2803 |
|
2804 | 2804 | \diffref{dcl.typedef} |
2805 | 2805 | \change |
2806 | | -A \Cpp{} \grammarterm{typedef-name} must be different from any class type name declared |
| 2806 | +A \Cpp{} \grammarterm{typedef-name} is required to be different from any class type name declared |
2807 | 2807 | in the same scope (except if the typedef is a synonym of the class name with the |
2808 | 2808 | same name). In C, a \grammarterm{typedef-name} and a struct tag name declared in the same scope |
2809 | 2809 | can have the same name (because they have different name spaces). |
|
2836 | 2836 |
|
2837 | 2837 | \diffref{dcl.type} [see also \ref{basic.link}] |
2838 | 2838 | \change |
2839 | | -Const objects must be initialized in \Cpp{} but can be left uninitialized in C. |
| 2839 | +Const objects are required to be initialized in \Cpp{} but can be left uninitialized in C. |
2840 | 2840 | \rationale |
2841 | | -A const object cannot be assigned to so it must be initialized |
| 2841 | +A const object cannot be assigned to so it is required to be initialized |
2842 | 2842 | to hold a useful value. |
2843 | 2843 | \effect |
2844 | 2844 | Deletion of semantically well-defined feature. |
|
2888 | 2888 | This feature was marked as ``obsolescent'' in C. |
2889 | 2889 | \difficulty |
2890 | 2890 | Syntactic transformation. |
2891 | | -The function declarations using C incomplete declaration style must |
2892 | | -be completed to become full prototype declarations. |
| 2891 | +The function declarations using C incomplete declaration style |
| 2892 | +need to be completed to become full prototype declarations. |
2893 | 2893 | A program may need to be updated further if different calls to the |
2894 | 2894 | same (non-prototype) function have different numbers of arguments or |
2895 | 2895 | if the type of corresponding arguments differed. |
|
2917 | 2917 | Deletion of semantically well-defined feature. |
2918 | 2918 | \difficulty |
2919 | 2919 | Semantic transformation. |
2920 | | -The type definitions must be moved to file scope, or in header files. |
| 2920 | +The type definitions need to be moved to file scope, or in header files. |
2921 | 2921 | \howwide |
2922 | 2922 | Seldom. |
2923 | 2923 | This style of type definition is seen as poor coding style. |
|
2941 | 2941 | compared to the corresponding functionality in C\@. |
2942 | 2942 | In \Cpp{}, |
2943 | 2943 | designators for non-static data members |
2944 | | -must be specified in declaration order, |
| 2944 | +need to be specified in declaration order, |
2945 | 2945 | designators for array elements and nested designators |
2946 | 2946 | are not supported, |
2947 | 2947 | and |
|
2960 | 2960 | \rationale |
2961 | 2961 | In \Cpp{}, members are destroyed in reverse construction order |
2962 | 2962 | and the elements of an initializer list are evaluated in lexical order, |
2963 | | -so member initializers must be specified in order. |
| 2963 | +so member initializers need to be specified in order. |
2964 | 2964 | Array designators conflict with \grammarterm{lambda-expression} syntax. |
2965 | 2965 | Nested designators are seldom used. |
2966 | 2966 | \effect |
|
2974 | 2974 | \diffref{dcl.init.string} |
2975 | 2975 | \change |
2976 | 2976 | In \Cpp{}, when initializing an array of character with a string, the number of |
2977 | | -characters in the string (including the terminating \tcode{'\textbackslash 0'}) must not exceed the |
| 2977 | +characters in the string (including the terminating \tcode{'\textbackslash 0'}) |
| 2978 | +is required not to exceed the |
2978 | 2979 | number of elements in the array. In C, an array can be initialized with a string even if |
2979 | 2980 | the array is not large enough to contain the string-terminating \tcode{'\textbackslash 0'}. |
2980 | 2981 |
|
|
2989 | 2990 | Deletion of semantically well-defined feature. |
2990 | 2991 | \difficulty |
2991 | 2992 | Semantic transformation. |
2992 | | -The arrays must be declared one element bigger to contain the |
| 2993 | +The arrays need to be declared one element bigger to contain the |
2993 | 2994 | string terminating \tcode{'\textbackslash 0'}. |
2994 | 2995 | \howwide |
2995 | 2996 | Seldom. |
|
3141 | 3142 | \difficulty |
3142 | 3143 | Semantic transformation. |
3143 | 3144 | If volatile semantics are required for the copy, |
3144 | | -a user-declared constructor or assignment must |
| 3145 | +a user-declared constructor or assignment needs to |
3145 | 3146 | be provided. |
3146 | 3147 | If non-volatile semantics are required, |
3147 | 3148 | an explicit |
|
0 commit comments