Forráskód Böngészése

* fixed -Sx (mantis #25930)

git-svn-id: trunk@27697 -
Jonas Maebe 11 éve
szülő
commit
724a6e9019
3 módosított fájl, 22 hozzáadás és 2 törlés
  1. 1 0
      .gitattributes
  2. 2 2
      compiler/options.pas
  3. 19 0
      tests/webtbs/tw25930.pp

+ 1 - 0
.gitattributes

@@ -13914,6 +13914,7 @@ tests/webtbs/tw2588.pp svneol=native#text/plain
 tests/webtbs/tw2589.pp svneol=native#text/plain
 tests/webtbs/tw25895.pp svneol=native#text/pascal
 tests/webtbs/tw25929.pp svneol=native#text/pascal
+tests/webtbs/tw25930.pp svneol=native#text/plain
 tests/webtbs/tw25932.pp svneol=native#text/plain
 tests/webtbs/tw2594.pp svneol=native#text/plain
 tests/webtbs/tw2595.pp svneol=native#text/plain

+ 2 - 2
compiler/options.pas

@@ -1675,9 +1675,9 @@ begin
                            include(init_settings.globalswitches,cs_support_vectors);
                        'x' :
                          If UnsetBool(More, j, opt, false) then
-                           exclude(init_settings.globalswitches,cs_support_exceptions)
+                           SetCompileModeSwitch('EXCEPTIONS-',true)
                          else
-                           include(init_settings.globalswitches,cs_support_exceptions);
+                           SetCompileModeSwitch('EXCEPTIONS',true);
                        'y' :
                          If UnsetBool(More, j, opt, false) then
                            exclude(init_settings.localswitches,cs_typed_addresses)

+ 19 - 0
tests/webtbs/tw25930.pp

@@ -0,0 +1,19 @@
+{ %norun }
+{ %opt=-Sx }
+
+{ this is file a.pas }
+
+begin   try write('') finally write('') end   end .
+
+{
+$
+$
+$ fpc -Mfpc -Sx a
+a.pas(3,13) Error: Identifier not found "try"
+. . . .
+$
+$
+$ fpc -Mfpc -Mexceptions a
+$
+$
+}