diff --git a/compiler/globals.pas b/compiler/globals.pas index 1639d9ea73..bea7cfb391 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -69,6 +69,8 @@ interface {$endif} macmodeswitches = [m_mac,m_all,m_result,m_cvar_support,m_mac_procvar]; + isomodeswitches = + [m_iso,m_all,m_tp_procvar,m_duplicate_names]; { maximum nesting of routines } maxnesting = 32; diff --git a/compiler/globtype.pas b/compiler/globtype.pas index be93036801..a9fc6c4b01 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -245,7 +245,7 @@ interface { Switches which can be changed by a mode (fpc,tp7,delphi) } tmodeswitch = (m_none,m_all, { needed for keyword } { generic } - m_fpc,m_objfpc,m_delphi,m_tp7,m_mac, + m_fpc,m_objfpc,m_delphi,m_tp7,m_mac,m_iso, {$ifdef fpc_mode}m_gpc,{$endif} { more specific } m_class, { delphi class model } @@ -364,7 +364,7 @@ interface {$endif} modeswitchstr : array[tmodeswitch] of string[18] = ('','', - '','','','','', + '','','','','','', {$ifdef fpc_mode}'',{$endif} { more specific } 'CLASS', diff --git a/compiler/scanner.pas b/compiler/scanner.pas index 4bf254a0d5..53819988e7 100644 --- a/compiler/scanner.pas +++ b/compiler/scanner.pas @@ -346,6 +346,9 @@ implementation else if s='MACPAS' then current_settings.modeswitches:=macmodeswitches + else + if s='ISO' then + current_settings.modeswitches:=isomodeswitches else b:=false; @@ -359,8 +362,8 @@ implementation HandleModeSwitches(changeinit); - { turn on bitpacking for mode macpas } - if (m_mac in current_settings.modeswitches) then + { turn on bitpacking for mode macpas and iso pascal } + if ([m_mac,m_iso] * current_settings.modeswitches <> []) then begin include(current_settings.localswitches,cs_bitpacking); if changeinit then @@ -368,7 +371,7 @@ implementation end; { support goto/label by default in delphi/tp7/mac modes } - if ([m_delphi,m_tp7,m_mac] * current_settings.modeswitches <> []) then + if ([m_delphi,m_tp7,m_mac,m_iso] * current_settings.modeswitches <> []) then begin include(current_settings.moduleswitches,cs_support_goto); if changeinit then