Browse Source

+ added warning in case a far pointer is declared on a platform that does not
support them

git-svn-id: trunk@28084 -

nickysn 11 years ago
parent
commit
8b7863d076
4 changed files with 326 additions and 319 deletions
  1. 5 1
      compiler/msg/errore.msg
  2. 3 2
      compiler/msgidx.inc
  3. 315 313
      compiler/msgtxt.inc
  4. 3 3
      compiler/pdecl.pas

+ 5 - 1
compiler/msg/errore.msg

@@ -408,7 +408,7 @@ scan_w_heapmax_lessthan_heapmin=02097_W_The specified HeapMax value is smaller t
 #
 #
 # Parser
 # Parser
 #
 #
-# 03337 is the last used one
+# 03338 is the last used one
 #
 #
 % \section{Parser messages}
 % \section{Parser messages}
 % This section lists all parser messages. The parser takes care of the
 % This section lists all parser messages. The parser takes care of the
@@ -1521,6 +1521,10 @@ parser_e_default_value_val_const=03337_E_Default values can only be specified fo
 % when calling the routine, and the compiler will instead pass the specified
 % when calling the routine, and the compiler will instead pass the specified
 % default (constant) value. As a result, default values can only be specified
 % default (constant) value. As a result, default values can only be specified
 % for parameters that can accept constant values.
 % for parameters that can accept constant values.
+parser_w_ptr_type_ignored=03338_W_Pointer type "$1" ignored
+% The specified pointer type modifier is ignored, because it is not supported on
+% the current platform. This happens, for example, when a far pointer is
+% declared on a non-x86 platform.
 %
 %
 %
 %
 %
 %

+ 3 - 2
compiler/msgidx.inc

@@ -438,6 +438,7 @@ const
   parser_e_property_only_sgr=03335;
   parser_e_property_only_sgr=03335;
   parser_e_overloaded_have_same_mangled_name=03336;
   parser_e_overloaded_have_same_mangled_name=03336;
   parser_e_default_value_val_const=03337;
   parser_e_default_value_val_const=03337;
+  parser_w_ptr_type_ignored=03338;
   type_e_mismatch=04000;
   type_e_mismatch=04000;
   type_e_incompatible_types=04001;
   type_e_incompatible_types=04001;
   type_e_not_equal_types=04002;
   type_e_not_equal_types=04002;
@@ -991,9 +992,9 @@ const
   option_info=11024;
   option_info=11024;
   option_help_pages=11025;
   option_help_pages=11025;
 
 
-  MsgTxtSize = 71815;
+  MsgTxtSize = 71849;
 
 
   MsgIdxMax : array[1..20] of longint=(
   MsgIdxMax : array[1..20] of longint=(
-    26,98,338,122,89,57,126,27,202,64,
+    26,98,339,122,89,57,126,27,202,64,
     58,20,1,1,1,1,1,1,1,1
     58,20,1,1,1,1,1,1,1,1
   );
   );

File diff suppressed because it is too large
+ 315 - 313
compiler/msgtxt.inc


+ 3 - 3
compiler/pdecl.pas

@@ -728,7 +728,7 @@ implementation
   {$elseif defined(x86_64)}
   {$elseif defined(x86_64)}
                        { for compatibility with previous versions of fpc,
                        { for compatibility with previous versions of fpc,
                          far pointer = regular pointer on x86_64 }
                          far pointer = regular pointer on x86_64 }
-                       { TODO: decide if we still want to keep this }
+                       Message1(parser_w_ptr_type_ignored,'FAR');
   {$endif}
   {$endif}
                        consume(_SEMICOLON);
                        consume(_SEMICOLON);
                      end
                      end
@@ -755,10 +755,10 @@ implementation
                        end;
                        end;
 {$else x86}
 {$else x86}
                     { Previous versions of FPC support declaring a pointer as
                     { Previous versions of FPC support declaring a pointer as
-                      far even on non-x86 platforms.
-                      TODO: decide if we still want to keep this }
+                      far even on non-x86 platforms. }
                     if try_to_consume(_FAR) then
                     if try_to_consume(_FAR) then
                      begin
                      begin
+                       Message1(parser_w_ptr_type_ignored,'FAR');
                        consume(_SEMICOLON);
                        consume(_SEMICOLON);
                      end;
                      end;
 {$endif x86}
 {$endif x86}

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