Explorar o código

Skip note "variable has align directive larger than system maximum alignment" for systems with maxalignvar=1

ccrause hai 2 semanas
pai
achega
d131af1572
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      compiler/ngenutil.pas
  2. 1 1
      compiler/tgobj.pas

+ 1 - 1
compiler/ngenutil.pas

@@ -985,7 +985,7 @@ implementation
               Message1(scanner_w_alignment_larger_than_max,sym.name);
               Message1(scanner_w_alignment_larger_than_max,sym.name);
               varalign:=explicitalign;
               varalign:=explicitalign;
             end
             end
-          else if (wantedalign>varalign) then
+          else if (wantedalign>varalign) and (target_info.alignment.varalignmax>1) then
             begin
             begin
               { varalign:=wantedalign; this can lead to
               { varalign:=wantedalign; this can lead to
                 troubles on systems like for instance
                 troubles on systems like for instance

+ 1 - 1
compiler/tgobj.pas

@@ -766,7 +766,7 @@ implementation
             else
             else
               CGMessage1(scanner_w_local_alignment_larger_than_max,def.typename);
               CGMessage1(scanner_w_local_alignment_larger_than_max,def.typename);
           end
           end
-        else if (alignment>lalign) then
+        else if (alignment>lalign) and (current_settings.alignment.localalignmax>1) then
           begin
           begin
             if assigned(sym) then
             if assigned(sym) then
               CGMessage1(scanner_n_local_alignment_larger_than_max,sym.name)
               CGMessage1(scanner_n_local_alignment_larger_than_max,sym.name)