Przeglądaj źródła

o adjust define handling to resolve #19519
* ensure that all defines are written when running the compiler with -va
* even if a define is defined/undefined, write a message if it is written again

git-svn-id: trunk@17714 -

florian 14 lat temu
rodzic
commit
60e16260e1
2 zmienionych plików z 5 dodań i 4 usunięć
  1. 3 0
      compiler/options.pas
  2. 2 4
      compiler/symtable.pas

+ 3 - 0
compiler/options.pas

@@ -2448,6 +2448,9 @@ begin
     end;
   option.firstpass:=false;
 
+  { redefine target options so all defines are written even if no -Txxx is passed on the command line }
+  Option.TargetOptions(true);
+
 { target is set here, for wince the default app type is gui }
   if target_info.system in systems_wince then
     apptype:=app_gui;

+ 2 - 4
compiler/symtable.pas

@@ -2911,8 +2911,7 @@ implementation
              else
                initialmacrosymtable.insert(mac);
            end;
-         if not mac.defined then
-           Message1(parser_c_macro_defined,mac.name);
+         Message1(parser_c_macro_defined,mac.name);
          mac.defined:=true;
       end;
 
@@ -2993,8 +2992,7 @@ implementation
            {If not found, then it's already undefined.}
          else
            begin
-             if mac.defined then
-               Message1(parser_c_macro_undefined,mac.name);
+             Message1(parser_c_macro_undefined,mac.name);
              mac.defined:=false;
              mac.is_compiler_var:=false;
              { delete old definition }