Преглед на файлове

Merged revisions 9342 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/trunk

........
r9342 | yury | 2007-11-28 01:07:18 +0100 (Wed, 28 Nov 2007) | 2 lines

* Allow using constants in {$IF } directive in OBJFPC mode.
* Define FPC_OBJFPC_EXTENDED_IF to allow to test if this feature can be safely used.
........

git-svn-id: branches/fixes_2_2@9714 -

Vincent Snijders преди 17 години
родител
ревизия
d66c3971b4
променени са 2 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 1 0
      compiler/options.pas
  2. 1 1
      compiler/scanner.pas

+ 1 - 0
compiler/options.pas

@@ -2148,6 +2148,7 @@ begin
   def_system_macro('FPC_REAL2REAL_FIXED');
   def_system_macro('FPC_STRTOCHARARRAYPROC');
   def_system_macro('FPC_STRTOSHORTSTRINGPROC');
+  def_system_macro('FPC_OBJFPC_EXTENDED_IF');
 
 {$ifdef SUPPORT_UNALIGNED}
   def_system_macro('FPC_SUPPORTS_UNALIGNED');

+ 1 - 1
compiler/scanner.pas

@@ -943,7 +943,7 @@ In case not, the value returned can be arbitrary.
 
                     { Default is to return the original symbol }
                     read_factor:=hs;
-                    if eval and (m_delphi in current_settings.modeswitches) and (ctetString in factorType) then
+                    if eval and ([m_delphi,m_objfpc]*current_settings.modeswitches<>[]) and (ctetString in factorType) then
                       if searchsym(current_scanner.preproc_pattern,srsym,srsymtable) then
                         begin
                           case srsym.typ of