Browse Source

Add warning about dangerous typecast

Pierre Muller 2 years ago
parent
commit
46d3627185
3 changed files with 311 additions and 305 deletions
  1. 4 1
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 304 302
      compiler/msgtxt.inc

+ 4 - 1
compiler/msg/errore.msg

@@ -1649,7 +1649,8 @@ parser_w_ignoring_published_property=03365_W_This property will not be published
 %
 # Type Checking
 #
-# 04131 is the last used one
+# 04132 is the last used one
+# type_w_dangerous_type_conversion=04132
 #
 % \section{Type checking errors}
 % This section lists all errors that can occur when type checking is
@@ -1872,6 +1873,8 @@ type_e_constant_expr_expected=04052_E_Constant Expression expected
 type_e_operator_not_supported_for_types=04053_E_Operation "$1" not supported for types "$2" and "$3"
 % The operation is not allowed for the supplied types.
 type_e_illegal_type_conversion=04054_E_Illegal type conversion: "$1" to "$2"
+% The operation is allowed for compatibility but types are not .
+type_w_dangerous_type_conversion=04132_W_Dangerous type conversion: "$1" to "$2"
 % When doing a type-cast, you must take care that the sizes of the variable and
 % the destination type are the same.
 type_h_pointer_to_longint_conv_not_portable=04055_H_Conversion between ordinals and pointers is not portable

+ 3 - 2
compiler/msgidx.inc

@@ -533,6 +533,7 @@ const
   type_e_constant_expr_expected=04052;
   type_e_operator_not_supported_for_types=04053;
   type_e_illegal_type_conversion=04054;
+  type_w_dangerous_type_conversion=04132;
   type_h_pointer_to_longint_conv_not_portable=04055;
   type_w_pointer_to_longint_conv_not_portable=04056;
   type_e_cant_choose_overload_function=04057;
@@ -1157,9 +1158,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 90549;
+  MsgTxtSize = 90597;
 
   MsgIdxMax : array[1..20] of longint=(
-    28,109,366,132,100,63,148,38,223,71,
+    28,109,366,133,100,63,148,38,223,71,
     65,20,30,1,1,1,1,1,1,1
   );

File diff suppressed because it is too large
+ 304 - 302
compiler/msgtxt.inc


Some files were not shown because too many files changed in this diff