瀏覽代碼

Merged revisions 8014,8016,8027,8034,8036-8037,8039,8044,8046,8048,8051,8060,8071,8075-8076,8082-8083,8087-8089,8091,8095-8096,8098-8100,8136,8138,8143,8148,8154,8157-8160,8164-8166,8170,8174-8177,8187-8188,8190,8203,8206-8207,8212-8213,8215-8217,8219,8223,8225,8227,8233-8239,8252-8253,8262,8268-8273,8275,8281,8284,8302,8305,8307,8309,8316,8318-8319,8324-8325,8327,8336-8341,8347,8349,8351,8354,8357-8359,8370-8371,8382-8383,8402,8404,8407-8408,8410-8411,8418,8420-8427,8430,8432,8434-8435,8438-8443,8445-8446,8448,8450-8454,8456-8457,8459,8462,8469-8470,8472-8483,8486-8488,8490,8493,8496,8506,8512 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r8014 | hajny | 2007-07-10 22:39:44 +0200 (Tue, 10 Jul 2007) | 1 line

* correction for typo in licence information
........
r8091 | jonas | 2007-07-18 21:03:49 +0200 (Wed, 18 Jul 2007) | 2 lines

* fixed tonnode.getcopy crash in case there is no exception variable
........
r8098 | michael | 2007-07-18 23:12:15 +0200 (Wed, 18 Jul 2007) | 1 line

* Patch from Ido Kanner to update translations
........
r8138 | peter | 2007-07-22 21:47:55 +0200 (Sun, 22 Jul 2007) | 3 lines

* create a new vmt entry also if return type differs
* search all parent classes for matching interface implementations
........
r8143 | peter | 2007-07-23 00:56:35 +0200 (Mon, 23 Jul 2007) | 2 lines

* keep signess of orginal variable in shl/shr operation
........
r8148 | peter | 2007-07-23 11:15:32 +0200 (Mon, 23 Jul 2007) | 2 lines

* allow local procsym in delphi mode
........
r8154 | peter | 2007-07-23 22:16:23 +0200 (Mon, 23 Jul 2007) | 2 lines

* check for valid reference before parsing extra constant values
........
r8157 | florian | 2007-07-23 22:25:04 +0200 (Mon, 23 Jul 2007) | 2 lines

* ignore pic directive/switch if the platform doesn't support pic, resolves #9281
........
r8158 | peter | 2007-07-23 22:38:05 +0200 (Mon, 23 Jul 2007) | 2 lines

* for tp mode don't allow unitname reuse
........
r8159 | peter | 2007-07-23 23:01:32 +0200 (Mon, 23 Jul 2007) | 2 lines

* write also asmblocklabel for a connected labelsym
........
r8160 | peter | 2007-07-23 23:36:16 +0200 (Mon, 23 Jul 2007) | 2 lines

* shorten mangledname names much quicker for nested procedures
........
r8164 | michael | 2007-07-25 14:06:57 +0200 (Wed, 25 Jul 2007) | 1 line

* Implemented support for custom RC compiler and .RES linker
........
r8165 | jonas | 2007-07-25 17:42:30 +0200 (Wed, 25 Jul 2007) | 4 lines

+ support for {$linkframework x} to link to framework x (Darwin only)
+ support for {$frameworkpath x} and -Ffx to add x to the directories to
search for frameworks (Darwin only)
........
r8166 | jonas | 2007-07-25 18:25:14 +0200 (Wed, 25 Jul 2007) | 14 lines

* fixed handling of paths/files with spaces in their name in link.res
on platforms where the `cat link.res` trick is used. Those must
/not/ be quoted, because otherwise the shell assumes those quotes
are part of the filename, and will escape the quotes themselves.

Instead, write everything out without quotes, but set IFS to
<newline> before doing the cat, so that only a new line is seen
as a separator between items. The shell will then insert the
necessary quotes to escape the spaces. One disadvantage: this
means that other options, such as e.g. "-arch ppc" under Darwin,
must now be written split over two lines to avoid the shell
passing such parameters (which consist of two separate strings)
as one single parameter (with an escaped space) to ld.
........
r8170 | florian | 2007-07-27 16:17:06 +0200 (Fri, 27 Jul 2007) | 1 line

* update from Karl-Michael Schindler
........
r8174 | florian | 2007-07-28 10:40:10 +0200 (Sat, 28 Jul 2007) | 2 lines

+ .fini section support
........
r8175 | marco | 2007-07-28 12:09:23 +0200 (Sat, 28 Jul 2007) | 2 lines

* small fix for OS X related typo.
........
r8176 | jonas | 2007-07-28 12:47:31 +0200 (Sat, 28 Jul 2007) | 2 lines

* only create PASCALFINALIZE for programs and libraries
........
r8177 | jonas | 2007-07-28 12:48:12 +0200 (Sat, 28 Jul 2007) | 2 lines

* clean up of previous fix
........
r8188 | florian | 2007-07-29 16:29:19 +0200 (Sun, 29 Jul 2007) | 2 lines

* throw better error when variable values are used as typed consts, resolves #9333
........
r8216 | jonas | 2007-08-03 14:13:27 +0200 (Fri, 03 Aug 2007) | 6 lines

* generalised -W description to "target-specific options"
* mention for each -W option to which targets it applies
* show all available -W options for all target architectures they apply to
* reworded some option descriptions
* all option descriptions now start with a capital for consistency
........
r8217 | jonas | 2007-08-03 14:42:49 +0200 (Fri, 03 Aug 2007) | 2 lines

+ support for creating a bundle instead of a library on Darwin (-Wb)
........
r8219 | jonas | 2007-08-04 11:13:34 +0200 (Sat, 04 Aug 2007) | 3 lines

* use app_type instead of RelocSection for creating bundles, as
RelocSection is automatically set for all shared libraries
........
r8223 | jonas | 2007-08-05 13:05:20 +0200 (Sun, 05 Aug 2007) | 2 lines

* also pass -arch parameter when creating bundles
........
r8252 | yury | 2007-08-09 12:33:18 +0200 (Thu, 09 Aug 2007) | 1 line

* Corrected comment.
........
r8253 | jonas | 2007-08-09 13:57:52 +0200 (Thu, 09 Aug 2007) | 3 lines

* fixed bug which caused SSA to be less effective for integer
registers on 64 bit cpus
........
r8268 | jonas | 2007-08-12 13:31:19 +0200 (Sun, 12 Aug 2007) | 5 lines

* explicitly check for stringconstn next to stringdef in nadd, because
a stringconstn is often an arraydef. The result is that they again
get the same typeconversion behaviour as string variables, which is
important in case of overloaded operators (#9021/#9026)
........
r8269 | jonas | 2007-08-12 15:18:39 +0200 (Sun, 12 Aug 2007) | 3 lines

* make sure warnings/hints in set_varstate are always given at the
correct position
........
r8270 | jonas | 2007-08-12 15:19:30 +0200 (Sun, 12 Aug 2007) | 3 lines

* avoid spurious uninitialised warnings about array elements used as
for-loop counters
........
r8271 | jonas | 2007-08-12 15:20:46 +0200 (Sun, 12 Aug 2007) | 2 lines

+ test for previous commit
........
r8272 | jonas | 2007-08-12 15:50:52 +0200 (Sun, 12 Aug 2007) | 2 lines

* fixed parsing of "rcl/rcr rm,imm" (mantis #9025)
........
r8273 | jonas | 2007-08-12 21:52:57 +0200 (Sun, 12 Aug 2007) | 4 lines

* fixed regression of webtbs/tw2789 caused by r8270 (setting vs_read
without vsf_must_be_valid means that it's not really read, but
only used by sizeof or so)
........
r8275 | jonas | 2007-08-13 11:13:07 +0200 (Mon, 13 Aug 2007) | 4 lines

* fixed regression of webtbs/tw4254: if a constant (wide)string can't be
converted to a pchar at compile time, remove the cstring_to_pchar node
because it expects a stringconstn in pass_generate_code
........
r8281 | jonas | 2007-08-14 15:58:56 +0200 (Tue, 14 Aug 2007) | 3 lines

* also check for valid min/maxlabel range for jumptable in case
of cs_opt_size
........
r8284 | jonas | 2007-08-14 16:27:59 +0200 (Tue, 14 Aug 2007) | 4 lines

* disallow widechar sets (Delphi 7 compatible, and were handled wrongly
by FPC previously)
* tbs/tb0474 now fails -> renamed to tbf/tb0201 (+ new test tbf/tb0202)
........
r8305 | michael | 2007-08-25 15:33:46 +0200 (Sat, 25 Aug 2007) | 1 line

* Escaped some TeX special characters in documentation
........
r8324 | yury | 2007-08-28 22:54:32 +0200 (Tue, 28 Aug 2007) | 1 line

* Fixed inclusion of multiple resource files with icons or cursors. Patch by Sergei Gorelkin modified by me to reduce memory usage. Bug #9459.
........
r8325 | yury | 2007-08-28 23:06:15 +0200 (Tue, 28 Aug 2007) | 1 line

* Small improvement to previous commit.
........
r8327 | jonas | 2007-08-29 08:30:38 +0200 (Wed, 29 Aug 2007) | 2 lines

* fixed overload choosing error on 64 bit
........
r8337 | jonas | 2007-08-29 22:23:59 +0200 (Wed, 29 Aug 2007) | 3 lines

* fixed wrong uninitialized warnings with passing array elements
as out-parameters
........
r8341 | jonas | 2007-08-30 19:21:29 +0200 (Thu, 30 Aug 2007) | 2 lines

* detect division by zero in tmoddiv.simplify (mantis #9499)
........
r8347 | jonas | 2007-09-01 16:18:09 +0200 (Sat, 01 Sep 2007) | 4 lines

* also generate an implicit exception frame in case only the function
result is refcounted, since it may need to be finalized in case of
an exception (mantis #9385)
........
r8349 | jonas | 2007-09-01 21:38:27 +0200 (Sat, 01 Sep 2007) | 13 lines

+ support for specifying the minimal precision for floating point
constants. The default is currently 32 bits/single, which corresponds
to the old behaviour (constants which cannot be exactly represented
in the default/chosen precision will also still be automatically
upgraded to higher precision). Supported constructs:
* Command line switch -CF<x>
* Compiler directive {$MINFPCONSTPREC <x>}
whereby in both cases <x> can be default, 32 or 64. 80 is not supported
because there is no generic way to figure out whether the current target
actually supports 80 bit precision floating point calculations while
parsing the command line switches (pbestreal can still change in case of
win64 or -Cfsse2)
........
r8351 | jonas | 2007-09-02 09:49:50 +0200 (Sun, 02 Sep 2007) | 2 lines

* forgot to commit (-CF<x> support)
........
r8354 | jonas | 2007-09-02 18:16:25 +0200 (Sun, 02 Sep 2007) | 3 lines

* optimized TLinkedList.clear so it can use regvars for everything in
its loop (helps a lot on ppc)
........
r8357 | marco | 2007-09-02 21:22:04 +0200 (Sun, 02 Sep 2007) | 2 lines

* fixed bug #9577 using short boolean eval. While fixing also fixed next IF.
........
r8358 | jonas | 2007-09-02 22:29:26 +0200 (Sun, 02 Sep 2007) | 2 lines

* fixed typecast error in last char/widechar/widestring patch
........
r8359 | jonas | 2007-09-02 23:06:50 +0200 (Sun, 02 Sep 2007) | 2 lines

- removed unused variable after div-by-zero simplify patch
........
r8370 | jonas | 2007-09-03 18:37:24 +0200 (Mon, 03 Sep 2007) | 3 lines

* give an error for high(ansistring) and high(widestring)
(mantis #9579)
........
r8371 | jonas | 2007-09-03 20:24:07 +0200 (Mon, 03 Sep 2007) | 5 lines

* moved the setting of many target-specific defines to
TOption.TargetDefines and call it before parsing the config file,
so extra defines like UNIX and WINDOWS are already defined while
parsing the config file (mantis #9450)
........
r8382 | peter | 2007-09-04 20:29:58 +0200 (Tue, 04 Sep 2007) | 2 lines

* allow -l-
........
r8383 | peter | 2007-09-04 20:30:57 +0200 (Tue, 04 Sep 2007) | 2 lines

* missing not
........
r8402 | jonas | 2007-09-08 12:49:16 +0200 (Sat, 08 Sep 2007) | 6 lines

* better error messages for non-overloadable operators:
* only suggest = if the user tried to overload <>
* suggest ** if the user tried to overload ^ (mantis #9606)
* no suggestion otherwise
(instead of always suggesting '=')
........
r8407 | peter | 2007-09-08 17:25:25 +0200 (Sat, 08 Sep 2007) | 2 lines

* fix high value in pointer to array conversion
........
r8408 | jonas | 2007-09-08 17:26:55 +0200 (Sat, 08 Sep 2007) | 4 lines

* replaced uses of -1 as C_alignment with the symbolic constant name
* some reformatting of ppc-specific code to be the same as the
surrounding code
........
r8418 | peter | 2007-09-09 16:03:31 +0200 (Sun, 09 Sep 2007) | 2 lines

* indenting of node names
........
r8420 | peter | 2007-09-09 16:24:30 +0200 (Sun, 09 Sep 2007) | 3 lines

* remove -gg and -gd options
* minor capitalization fixes from bug #9640
........
r8421 | peter | 2007-09-09 16:31:17 +0200 (Sun, 09 Sep 2007) | 2 lines

* remove old_append_str
........
r8422 | jonas | 2007-09-09 16:58:55 +0200 (Sun, 09 Sep 2007) | 4 lines

* don't allow starting new virtual trees in TP-style objects + test
* fixed bug in whlpview.pas where such an new tree was unintentially
started
........
r8423 | florian | 2007-09-09 21:49:07 +0200 (Sun, 09 Sep 2007) | 1 line

* updates by Karl-Michael Schindler
........
r8424 | peter | 2007-09-10 18:40:03 +0200 (Mon, 10 Sep 2007) | 2 lines

* use fpc_decr_intf and zeroing for finalizing of interfaces
........
r8425 | peter | 2007-09-10 18:40:40 +0200 (Mon, 10 Sep 2007) | 2 lines

* use callnodeflag to check if the result of a function is used
........
r8426 | peter | 2007-09-10 18:41:29 +0200 (Mon, 10 Sep 2007) | 2 lines

* no refcount needed for all constants instead of only stringconst
........
r8427 | peter | 2007-09-10 18:48:33 +0200 (Mon, 10 Sep 2007) | 4 lines

* use regular ref_incr/ref_decr for related interface assignments
instead of fpc_intf_assign. This allows optimization by reusing
the left of the assignment for function return
........
r8432 | peter | 2007-09-12 00:13:31 +0200 (Wed, 12 Sep 2007) | 2 lines

* fix invalid typecast
........
r8434 | peter | 2007-09-12 00:26:36 +0200 (Wed, 12 Sep 2007) | 2 lines

* small typecheckpass wrapper for recursion
........
r8435 | peter | 2007-09-12 00:28:39 +0200 (Wed, 12 Sep 2007) | 2 lines

* fix invalid typecast
........
r8443 | florian | 2007-09-12 21:41:36 +0200 (Wed, 12 Sep 2007) | 2 lines

* setup proper starting value when optimizing away a loop, resolves #9096
........
r8512 | florian | 2007-09-16 20:55:15 +0200 (Sun, 16 Sep 2007) | 2 lines

* result for functions returning a managed type must be initialized and loaded, fixes #9704
........

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

peter 18 年之前
父節點
當前提交
01fd4f55f6
共有 94 個文件被更改,包括 2254 次插入1305 次删除
  1. 24 2
      .gitattributes
  2. 2 1
      compiler/aasmbase.pas
  3. 6 3
      compiler/aggas.pas
  4. 3 3
      compiler/cclasses.pas
  5. 94 6
      compiler/comprsrc.pas
  6. 10 2
      compiler/fmodule.pas
  7. 34 1
      compiler/globals.pas
  8. 10 2
      compiler/globtype.pas
  9. 6 6
      compiler/htypechk.pas
  10. 2 1
      compiler/i386/ag386nsm.pas
  11. 4 4
      compiler/i386/i386tab.inc
  12. 16 1
      compiler/link.pas
  13. 195 182
      compiler/msg/errord.msg
  14. 195 182
      compiler/msg/errordu.msg
  15. 186 169
      compiler/msg/errore.msg
  16. 25 4
      compiler/msg/errorhe.msg
  17. 25 4
      compiler/msg/errorheu.msg
  18. 4 2
      compiler/msgidx.inc
  19. 302 297
      compiler/msgtxt.inc
  20. 18 5
      compiler/nadd.pas
  21. 5 6
      compiler/nbas.pas
  22. 6 1
      compiler/ncal.pas
  23. 7 0
      compiler/ncgflw.pas
  24. 2 2
      compiler/ncgld.pas
  25. 2 0
      compiler/ncgset.pas
  26. 7 4
      compiler/ncgutil.pas
  27. 37 5
      compiler/ncnv.pas
  28. 9 3
      compiler/nflw.pas
  29. 4 1
      compiler/ninl.pas
  30. 26 132
      compiler/nld.pas
  31. 13 14
      compiler/nmat.pas
  32. 36 48
      compiler/nobj.pas
  33. 12 0
      compiler/nutils.pas
  34. 6 4
      compiler/ogbase.pas
  35. 2 1
      compiler/ogcoff.pas
  36. 4 2
      compiler/ogelf.pas
  37. 129 48
      compiler/options.pas
  38. 1 1
      compiler/opttail.pas
  39. 11 4
      compiler/optunrol.pas
  40. 11 2
      compiler/pass_2.pas
  41. 26 18
      compiler/pdecsub.pas
  42. 15 15
      compiler/pdecvar.pas
  43. 5 3
      compiler/pexpr.pas
  44. 3 0
      compiler/pmodules.pas
  45. 1 1
      compiler/powerpc/agppcmpw.pas
  46. 5 2
      compiler/pstatmnt.pas
  47. 2 2
      compiler/psub.pas
  48. 17 8
      compiler/ptconst.pas
  49. 1 0
      compiler/ptype.pas
  50. 9 2
      compiler/raatt.pas
  51. 51 3
      compiler/scandir.pas
  52. 1 1
      compiler/scanner.pas
  53. 4 0
      compiler/script.pas
  54. 0 6
      compiler/symconst.pas
  55. 2 2
      compiler/symdef.pas
  56. 10 13
      compiler/symtable.pas
  57. 4 2
      compiler/systems.pas
  58. 7 4
      compiler/systems/i_win.pas
  59. 8 5
      compiler/systems/t_beos.pas
  60. 67 13
      compiler/systems/t_bsd.pas
  61. 4 4
      compiler/utils/msgdif.pp
  62. 22 3
      compiler/widestr.pas
  63. 2 0
      compiler/x86/agx86int.pas
  64. 1 1
      compiler/x86/nx86inl.pas
  65. 20 17
      compiler/x86/rax86att.pas
  66. 2 2
      compiler/x86/x86ins.dat
  67. 4 4
      compiler/x86_64/x8664tab.inc
  68. 4 4
      ide/whlpview.pas
  69. 3 1
      tests/tbf/tb0201.pp
  70. 8 0
      tests/tbf/tb0202.pp
  71. 13 0
      tests/tbs/tb0542.pp
  72. 13 0
      tests/test/tfwork1.pp
  73. 16 0
      tests/test/tfwork2.pp
  74. 0 14
      tests/webtbf/tw3183b.pp
  75. 19 0
      tests/webtbf/tw6957.pp
  76. 21 0
      tests/webtbf/tw9306c.pp
  77. 9 0
      tests/webtbf/tw9499.pp
  78. 10 0
      tests/webtbf/tw9499a.pp
  79. 7 0
      tests/webtbf/tw9579a.pp
  80. 7 0
      tests/webtbf/tw9579b.pp
  81. 2 0
      tests/webtbs/tw4254.pp
  82. 18 0
      tests/webtbs/tw6525.pp
  83. 27 0
      tests/webtbs/tw8678.pp
  84. 17 0
      tests/webtbs/tw8678a.pp
  85. 11 0
      tests/webtbs/tw9025.pp
  86. 28 0
      tests/webtbs/tw9026.pp
  87. 15 0
      tests/webtbs/tw9072.pp
  88. 12 0
      tests/webtbs/tw9096.pp
  89. 23 0
      tests/webtbs/tw9176a.pp
  90. 19 0
      tests/webtbs/tw9299.pp
  91. 63 0
      tests/webtbs/tw9306a.pp
  92. 63 0
      tests/webtbs/tw9306b.pp
  93. 28 0
      tests/webtbs/tw9385.pp
  94. 14 0
      tests/webtbs/tw9704.pp

+ 24 - 2
.gitattributes

@@ -5842,6 +5842,8 @@ tests/tbf/tb0198.pp svneol=native#text/plain
 tests/tbf/tb0199.pp -text
 tests/tbf/tb0199a.pp -text
 tests/tbf/tb0200.pp svneol=native#text/x-pascal
+tests/tbf/tb0201.pp svneol=native#text/plain
+tests/tbf/tb0202.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
@@ -6308,7 +6310,6 @@ tests/tbs/tb0470.pp svneol=native#text/plain
 tests/tbs/tb0471.pp svneol=native#text/plain
 tests/tbs/tb0472.pp svneol=native#text/plain
 tests/tbs/tb0473.pp svneol=native#text/plain
-tests/tbs/tb0474.pp svneol=native#text/plain
 tests/tbs/tb0475.pp svneol=native#text/plain
 tests/tbs/tb0476.pp svneol=native#text/plain
 tests/tbs/tb0477.pp svneol=native#text/plain
@@ -6379,6 +6380,7 @@ tests/tbs/tb0537.pp svneol=native#text/plain
 tests/tbs/tb0539.pp svneol=native#text/plain
 tests/tbs/tb0540.pp svneol=native#text/x-pascal
 tests/tbs/tb0541.pp svneol=native#text/plain
+tests/tbs/tb0542.pp svneol=native#text/plain
 tests/tbs/ub0060.pp svneol=native#text/plain
 tests/tbs/ub0069.pp svneol=native#text/plain
 tests/tbs/ub0119.pp svneol=native#text/plain
@@ -6877,6 +6879,8 @@ tests/test/tfpu3.pp svneol=native#text/plain
 tests/test/tfpu4.pp svneol=native#text/plain
 tests/test/tfpu5.pp svneol=native#text/plain
 tests/test/tfpuover.pp svneol=native#text/plain
+tests/test/tfwork1.pp svneol=native#text/plain
+tests/test/tfwork2.pp svneol=native#text/plain
 tests/test/tgeneric1.pp svneol=native#text/plain
 tests/test/tgeneric10.pp svneol=native#text/plain
 tests/test/tgeneric11.pp svneol=native#text/plain
@@ -7291,7 +7295,6 @@ tests/webtbf/tw3116.pp svneol=native#text/plain
 tests/webtbf/tw3126.pp svneol=native#text/plain
 tests/webtbf/tw3145.pp svneol=native#text/plain
 tests/webtbf/tw3183.pp svneol=native#text/plain
-tests/webtbf/tw3183b.pp svneol=native#text/plain
 tests/webtbf/tw3186.pp svneol=native#text/plain
 tests/webtbf/tw3218.pp svneol=native#text/plain
 tests/webtbf/tw3241.pp svneol=native#text/plain
@@ -7371,6 +7374,7 @@ tests/webtbf/tw6631.pp svneol=native#text/plain
 tests/webtbf/tw6686.pp svneol=native#text/plain
 tests/webtbf/tw6796.pp svneol=native#text/plain
 tests/webtbf/tw6922.pp svneol=native#text/plain
+tests/webtbf/tw6957.pp -text
 tests/webtbf/tw6970.pp svneol=native#text/plain
 tests/webtbf/tw7070.pp svneol=native#text/plain
 tests/webtbf/tw7322.pp svneol=native#text/plain
@@ -7411,6 +7415,11 @@ tests/webtbf/tw9039b.pp svneol=native#text/plain
 tests/webtbf/tw9039c.pp svneol=native#text/plain
 tests/webtbf/tw9039d.pp svneol=native#text/plain
 tests/webtbf/tw9225.pp svneol=native#text/plain
+tests/webtbf/tw9306c.pp svneol=native#text/plain
+tests/webtbf/tw9499.pp svneol=native#text/plain
+tests/webtbf/tw9499a.pp svneol=native#text/plain
+tests/webtbf/tw9579a.pp svneol=native#text/plain
+tests/webtbf/tw9579b.pp svneol=native#text/plain
 tests/webtbf/uw0744.pp svneol=native#text/plain
 tests/webtbf/uw0840a.pp svneol=native#text/plain
 tests/webtbf/uw0840b.pp svneol=native#text/plain
@@ -8190,6 +8199,7 @@ tests/webtbs/tw6203.pp svneol=native#text/plain
 tests/webtbs/tw6435.pp svneol=native#text/plain
 tests/webtbs/tw6491.pp svneol=native#text/plain
 tests/webtbs/tw6493.pp svneol=native#text/plain
+tests/webtbs/tw6525.pp -text
 tests/webtbs/tw6543.pp svneol=native#text/plain
 tests/webtbs/tw6624.pp svneol=native#text/plain
 tests/webtbs/tw6641.pp svneol=native#text/plain
@@ -8312,6 +8322,8 @@ tests/webtbs/tw8633.pp svneol=native#text/plain
 tests/webtbs/tw8660.pp svneol=native#text/plain
 tests/webtbs/tw8664.pp svneol=native#text/plain
 tests/webtbs/tw8677.pp svneol=native#text/plain
+tests/webtbs/tw8678.pp svneol=native#text/plain
+tests/webtbs/tw8678a.pp svneol=native#text/plain
 tests/webtbs/tw8685.pp svneol=native#text/plain
 tests/webtbs/tw8757.pp svneol=native#text/plain
 tests/webtbs/tw8810.pp svneol=native#text/plain
@@ -8323,11 +8335,15 @@ tests/webtbs/tw8883.pp svneol=native#text/plain
 tests/webtbs/tw8919.pp svneol=native#text/plain
 tests/webtbs/tw8935.pp svneol=native#text/plain
 tests/webtbs/tw8977.pp svneol=native#text/plain
+tests/webtbs/tw9025.pp svneol=native#text/plain
+tests/webtbs/tw9026.pp svneol=native#text/plain
 tests/webtbs/tw9054.pp svneol=native#text/plain
+tests/webtbs/tw9072.pp svneol=native#text/plain
 tests/webtbs/tw9073.pp svneol=native#text/plain
 tests/webtbs/tw9076.pp svneol=native#text/plain
 tests/webtbs/tw9076a.pp svneol=native#text/plain
 tests/webtbs/tw9085.pp svneol=native#text/plain
+tests/webtbs/tw9096.pp svneol=native#text/plain
 tests/webtbs/tw9098.pp svneol=native#text/plain
 tests/webtbs/tw9107.pp svneol=native#text/plain
 tests/webtbs/tw9113.pp svneol=native#text/plain
@@ -8338,16 +8354,22 @@ tests/webtbs/tw9145.pp svneol=native#text/plain
 tests/webtbs/tw9161.pp svneol=native#text/plain
 tests/webtbs/tw9162.pp svneol=native#text/plain
 tests/webtbs/tw9174.pp svneol=native#text/plain
+tests/webtbs/tw9176a.pp -text
 tests/webtbs/tw9179.pp svneol=native#text/plain
 tests/webtbs/tw9187.pp svneol=native#text/plain
 tests/webtbs/tw9190.pp svneol=native#text/plain
 tests/webtbs/tw9209.pp svneol=native#text/plain
 tests/webtbs/tw9221.pp svneol=native#text/plain
+tests/webtbs/tw9299.pp -text
+tests/webtbs/tw9306a.pp -text
+tests/webtbs/tw9306b.pp -text
 tests/webtbs/tw9309.pp -text
 tests/webtbs/tw9347.pp svneol=native#text/plain
 tests/webtbs/tw9347a.pp svneol=native#text/plain
 tests/webtbs/tw9347b.pp svneol=native#text/plain
+tests/webtbs/tw9385.pp svneol=native#text/plain
 tests/webtbs/tw9695.pp svneol=native#text/plain
+tests/webtbs/tw9704.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 2 - 1
compiler/aasmbase.pas

@@ -87,7 +87,8 @@ interface
          sec_fpc,
          { Table of contents section }
          sec_toc,
-         sec_init
+         sec_init,
+         sec_fini
        );
 
        TAsmSectionOrder = (secorder_begin,secorder_default,secorder_end);

+ 6 - 3
compiler/aggas.pas

@@ -265,7 +265,8 @@ implementation
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '.toc',
-          '.init'
+          '.init',
+          '.fini'
         );
         secnames_pic : array[TAsmSectiontype] of string[17] = ('',
           '.text',
@@ -282,7 +283,8 @@ implementation
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '.toc',
-          '.init'
+          '.init',
+          '.fini'
         );
       var
         sep     : string[3];
@@ -1180,7 +1182,8 @@ implementation
          sec_code (* sec_fpc *),
          { Table of contents section }
          sec_code (* sec_toc *),
-         sec_code (* sec_init *)
+         sec_code (* sec_init *),
+         sec_code (* sec_fini *)
         );
       begin
         Result := inherited SectionName (SecXTable [AType], AName, AOrder);

+ 3 - 3
compiler/cclasses.pas

@@ -1919,14 +1919,14 @@ end;
 
     procedure TLinkedList.clear;
       var
-        NewNode : TLinkedListItem;
+        NewNode, Next : TLinkedListItem;
       begin
         NewNode:=FFirst;
         while assigned(NewNode) do
          begin
-           FFirst:=NewNode.Next;
+           Next:=NewNode.Next;
            NewNode.Free;
-           NewNode:=FFirst;
+           NewNode:=Next;
           end;
         FLast:=nil;
         FFirst:=nil;

+ 94 - 6
compiler/comprsrc.pas

@@ -45,6 +45,8 @@ type
    TWinLikeResourceFile = class(tresourcefile)
    private
       FOut: TCFileStream;
+      FLastIconID: longint;
+      FLastCursorID: longint;
    public
       function IsCompiled(const fn : ansistring) : boolean;override;
       procedure Collect(const fn : ansistring);override;
@@ -53,6 +55,9 @@ type
 procedure CompileResourceFiles;
 procedure CollectResourceFiles;
 
+Var
+  ResCompiler : String;
+  RCCompiler  : String;
 
 implementation
 
@@ -96,6 +101,16 @@ end;
 
 
 procedure tresourcefile.compile(output: tresoutput; const OutName: ansistring);
+
+  Function SelectBin(Const Bin1,Bin2 : String) : String;
+  
+  begin
+    If (Bin1<>'') then
+      SelectBin:=Bin1
+    else
+      SelectBin:=Bin2;  
+  end;
+  
 var
   respath,
   srcfilepath,
@@ -106,9 +121,9 @@ var
   objused  : boolean;
 begin
   if output=roRES then
-    bin:=target_res.rcbin
+    Bin:=SelectBin(RCCompiler,target_res.rcbin)
   else
-    bin:=target_res.resbin;
+    Bin:=SelectBin(ResCompiler,target_res.resbin);
   if bin='' then
     exit;
   resfound:=false;
@@ -215,12 +230,37 @@ type
   TResHeader = packed record
     DataSize: dword;
     HeaderSize: dword;
+    ResTypeFlag: word;
+    ResTypeID: word;
+  end;
+  
+  PIconHeader = ^TIconHeader;
+  TIconHeader = packed record
+    Reserved: word;
+    wType: word;
+    wCount: word;
+  end;
+  
+  PIconDir = ^TIconDir;
+  TIconDir = packed record
+    bWidth: byte;
+    bHeight: byte;
+    bColorCount: byte;
+    bReserved: byte;
+    wPlanes: word;
+    wBitCount: word;
+    lBytesInRes: dword;
+    wNameOrdinal: word;
   end;
 
 var
   fs: TCFileStream;
-  i, sz: longint;
+  i, sz, rsz, MaxIconID, MaxCursorID: longint;
   hdr: TResHeader;
+  P: pointer;
+  PData: PIconHeader;
+  PDir: PIconDir;
+  ResNameBuf: array[0..1] of word;
 begin
   if fn='' then
     begin
@@ -249,18 +289,64 @@ begin
       else
         fs.Seek(32, soFromBeginning);
       sz:=fs.Size;
+      MaxIconID := 0;
+      MaxCursorID := 0;
       repeat
         fs.ReadBuffer(hdr, SizeOf(hdr));
         FOut.WriteBuffer(hdr, SizeOf(hdr));
-        i:=hdr.HeaderSize + hdr.DataSize - SizeOf(hdr);
-        if fs.Position + i > sz then
+        rsz:=hdr.HeaderSize + hdr.DataSize - SizeOf(hdr);
+        if fs.Position + rsz > sz then
           begin
             Comment(V_Error,'Invalid resource file: '+fn);
             Include(current_settings.globalswitches, cs_link_nolink);
             fs.Free;
             exit;
           end;
-        FOut.CopyFrom(fs, i);
+        { Adjusting cursor and icon IDs }
+        if hdr.ResTypeFlag = $FFFF then       { resource type is ordinal }
+          case hdr.ResTypeID of
+            1, 3:
+              { cursor or icon resource }
+              begin
+                fs.ReadBuffer(ResNameBuf, SizeOf(ResNameBuf));
+                if ResNameBuf[0] = $FFFF then   { resource name is ordinal }
+                  if hdr.ResTypeID = 1 then
+                    begin
+                      if ResNameBuf[1] > MaxCursorID then
+                        MaxCursorID:=ResNameBuf[1];
+                      Inc(ResNameBuf[1], FLastCursorID);
+                    end
+                  else
+                    begin
+                      if ResNameBuf[1] > MaxIconID then
+                        MaxIconID:=ResNameBuf[1];
+                      Inc(ResNameBuf[1], FLastIconID);
+                    end;
+                FOut.WriteBuffer(ResNameBuf, SizeOf(ResNameBuf));
+                Dec(rsz, SizeOf(ResNameBuf));
+              end;
+            12, 14:
+              { cursor or icon group resource }
+              begin
+                GetMem(P, rsz);
+                fs.ReadBuffer(P^, rsz);
+                PData := PIconHeader(P + hdr.HeaderSize - sizeof(hdr));
+                PDir := PIconDir(Pointer(PData) + sizeof(TIconHeader));
+                for i := 0 to PData^.wCount-1 do
+                  begin
+                    if hdr.ResTypeID = 12 then
+                      Inc(PDir^.wNameOrdinal, FLastCursorID)
+                    else
+                      Inc(PDir^.wNameOrdinal, FLastIconID);
+                    Inc(PDir);
+                  end;
+                FOut.WriteBuffer(P^, rsz);
+                rsz:=0;
+                FreeMem(P);
+              end;
+          end;
+        { copy rest of the resource data }
+        FOut.CopyFrom(fs, rsz);
         { align resource to dword }
         i:=4 - FOut.Position mod 4;
         if i<4 then
@@ -271,6 +357,8 @@ begin
           fs.Seek(i, soFromCurrent);
       until fs.Position + SizeOf(hdr) >= sz;
       fs.Free;
+      Inc(FLastCursorID, MaxCursorID);
+      Inc(FLastIconID, MaxIconID);
     except
       on E:EOSError do begin
         Comment(V_Error,'Error processing resource file: '+fn+': '+E.Message);

+ 10 - 2
compiler/fmodule.pas

@@ -142,7 +142,8 @@ interface
         linkunitsharedlibs,
         linkotherofiles,           { objects,libs loaded from the source }
         linkothersharedlibs,       { using $L or $LINKLIB or import lib (for linux) }
-        linkotherstaticlibs  : tlinkcontainer;
+        linkotherstaticlibs,
+        linkotherframeworks  : tlinkcontainer;
 
         used_units           : tlinkedlist;
         dependent_units      : tlinkedlist;
@@ -150,7 +151,8 @@ interface
         localunitsearchpath,           { local searchpaths }
         localobjectsearchpath,
         localincludesearchpath,
-        locallibrarysearchpath : TSearchPathList;
+        locallibrarysearchpath,
+        localframeworksearchpath : TSearchPathList;
 
         {create creates a new module which name is stored in 's'. LoadedFrom
         points to the module calling it. It is nil for the first compiled
@@ -434,6 +436,7 @@ implementation
         localobjectsearchpath:=TSearchPathList.Create;
         localincludesearchpath:=TSearchPathList.Create;
         locallibrarysearchpath:=TSearchPathList.Create;
+        localframeworksearchpath:=TSearchPathList.Create;
         used_units:=TLinkedList.Create;
         dependent_units:=TLinkedList.Create;
         resourcefiles:=TCmdStrList.Create;
@@ -443,6 +446,7 @@ implementation
         linkotherofiles:=TLinkContainer.Create;
         linkotherstaticlibs:=TLinkContainer.Create;
         linkothersharedlibs:=TLinkContainer.Create;
+        linkotherframeworks:=TLinkContainer.Create;
         FImportLibraryList:=TFPHashObjectList.Create(true);
         crc:=0;
         interface_crc:=0;
@@ -534,6 +538,7 @@ implementation
         linkotherofiles.Free;
         linkotherstaticlibs.Free;
         linkothersharedlibs.Free;
+        linkotherframeworks.Free;
         FImportLibraryList.Free;
         stringdispose(objfilename);
         stringdispose(asmfilename);
@@ -551,6 +556,7 @@ implementation
         localobjectsearchpath.free;
         localincludesearchpath.free;
         locallibrarysearchpath.free;
+        localframeworksearchpath.free;
 {$ifdef MEMDEBUG}
         memsymtable.start;
 {$endif}
@@ -673,6 +679,8 @@ implementation
         linkotherstaticlibs:=TLinkContainer.Create;
         linkothersharedlibs.Free;
         linkothersharedlibs:=TLinkContainer.Create;
+        linkotherframeworks.Free;
+        linkotherframeworks:=TLinkContainer.Create;
         FImportLibraryList.Free;
         FImportLibraryList:=TFPHashObjectList.Create;
         do_compile:=false;

+ 34 - 1
compiler/globals.pas

@@ -133,6 +133,8 @@ interface
 
          packrecords     : shortint;
          maxfpuregisters : shortint;
+
+         minfpconstprec  : tfloattype;
        end;
 
     const
@@ -207,7 +209,8 @@ interface
        librarysearchpath,
        unitsearchpath,
        objectsearchpath,
-       includesearchpath  : TSearchPathList;
+       includesearchpath,
+       frameworksearchpath  : TSearchPathList;
        autoloadunits      : string;
 
        { linking }
@@ -341,6 +344,7 @@ interface
     function UpdateAlignmentStr(s:string;var a:talignmentinfo):boolean;
     function UpdateOptimizerStr(s:string;var a:toptimizerswitches):boolean;
     function IncludeFeature(const s : string) : boolean;
+    function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
 
     {# Routine to get the required alignment for size of data, which will
        be placed in bss segment, according to the current alignment requirements }
@@ -1003,6 +1007,32 @@ implementation
       end;
 
 
+    function SetMinFPConstPrec(const s: string; var a: tfloattype) : boolean;
+      var
+        value, error: longint;
+      begin
+        if (upper(s)='DEFAULT') then
+          begin
+            a:=s32real;
+            result:=true;
+            exit;
+          end;
+        result:=false;
+        val(s,value,error);
+        if (error<>0) then
+          exit;
+        case value of
+          32: a:=s32real;
+          64: a:=s64real;
+          { adding support for 80 bit here is tricky, since we can't really }
+          { check whether the target cpu+OS actually supports it            }
+          else
+            exit;
+        end;
+        result:=true;
+      end;
+
+
     function var_align(siz: longint): shortint;
       begin
         siz := size_2_align(siz);
@@ -1085,6 +1115,7 @@ implementation
        unitsearchpath.Free;
        objectsearchpath.Free;
        includesearchpath.Free;
+       frameworksearchpath.Free;
        LinkLibraryAliases.Free;
        LinkLibraryOrder.Free;
      end;
@@ -1125,6 +1156,7 @@ implementation
         unitsearchpath:=TSearchPathList.Create;
         includesearchpath:=TSearchPathList.Create;
         objectsearchpath:=TSearchPathList.Create;
+        frameworksearchpath:=TSearchPathList.Create;
 
         { Def file }
         usewindowapi:=false;
@@ -1165,6 +1197,7 @@ implementation
         init_settings.packenum:=4;
         init_settings.setalloc:=0;
         fillchar(init_settings.alignment,sizeof(talignmentinfo),0);
+        init_settings.minfpconstprec:=s32real;
         { might be overridden later }
         init_settings.asmmode:=asmmode_standard;
         init_settings.cputype:=cpu_none;

+ 10 - 2
compiler/globtype.pas

@@ -217,7 +217,8 @@ interface
          app_fs,        { full-screen type application (OS/2 and EMX only) }
          app_tool,      { tool application, (MPW tool for MacOS, MacOS only)}
          app_arm7,
-         app_arm9
+         app_arm9,
+         app_bundle     { dynamically loadable bundle, Darwin only }
        );
 
        { interface types }
@@ -327,6 +328,13 @@ interface
        );
        tprocinfoflags=set of tprocinfoflag;
 
+    type
+      { float types }
+      tfloattype = (
+        s32real,s64real,s80real,
+        s64comp,s64currency,s128real
+      );
+
     type
        TIDString = string[maxidlen];
 
@@ -362,7 +370,7 @@ interface
     const
        { link options }
        link_none    = $0;
-       link_always = $1;
+       link_always  = $1;
        link_static  = $2;
        link_smart   = $4;
        link_shared  = $8;

+ 6 - 6
compiler/htypechk.pas

@@ -848,25 +848,25 @@ implementation
                             if (vo_is_funcret in hsym.varoptions) then
                               begin
                                 if (vsf_use_hints in varstateflags) then
-                                  CGMessage(sym_h_function_result_uninitialized)
+                                  CGMessagePos(p.fileinfo,sym_h_function_result_uninitialized)
                                 else
-                                  CGMessage(sym_w_function_result_uninitialized)
+                                  CGMessagePos(p.fileinfo,sym_w_function_result_uninitialized)
                               end
                             else
                               begin
                                 if tloadnode(p).symtable.symtabletype=localsymtable then
                                   begin
                                     if (vsf_use_hints in varstateflags) then
-                                      CGMessage1(sym_h_uninitialized_local_variable,hsym.realname)
+                                      CGMessagePos1(p.fileinfo,sym_h_uninitialized_local_variable,hsym.realname)
                                     else
-                                      CGMessage1(sym_w_uninitialized_local_variable,hsym.realname);
+                                      CGMessagePos1(p.fileinfo,sym_w_uninitialized_local_variable,hsym.realname);
                                   end
                                 else
                                   begin
                                     if (vsf_use_hints in varstateflags) then
-                                      CGMessage1(sym_h_uninitialized_variable,hsym.realname)
+                                      CGMessagePos1(p.fileinfo,sym_h_uninitialized_variable,hsym.realname)
                                     else
-                                      CGMessage1(sym_w_uninitialized_variable,hsym.realname);
+                                      CGMessagePos1(p.fileinfo,sym_w_uninitialized_variable,hsym.realname);
                                   end;
                               end;
                           end

+ 2 - 1
compiler/i386/ag386nsm.pas

@@ -414,7 +414,8 @@ interface
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '',
-          '.init'
+          '.init',
+          '.fini'
         );
       begin
         AsmLn;

+ 4 - 4
compiler/i386/i386tab.inc

@@ -5456,9 +5456,9 @@
   (
     opcode  : A_RCL;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#130#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCL;
@@ -5498,9 +5498,9 @@
   (
     opcode  : A_RCR;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#131#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCR;

+ 16 - 1
compiler/link.pas

@@ -51,7 +51,8 @@ interface
          SysInitUnit     : string[20];
          ObjectFiles,
          SharedLibFiles,
-         StaticLibFiles  : TCmdStrList;
+         StaticLibFiles,
+         FrameworkFiles  : TCmdStrList;
          Constructor Create;virtual;
          Destructor Destroy;override;
          procedure AddModuleFiles(hp:tmodule);
@@ -60,6 +61,7 @@ interface
          Procedure AddSharedLibrary(S : TCmdStr);
          Procedure AddStaticCLibrary(const S : TCmdStr);
          Procedure AddSharedCLibrary(S : TCmdStr);
+         Procedure AddFramework(S : TCmdStr);
          procedure AddImportSymbol(const libname,symname:TCmdStr;OrdNr: longint;isvar:boolean);virtual;
          Procedure InitSysInitUnitName;virtual;
          Function  MakeExecutable:boolean;virtual;
@@ -290,6 +292,7 @@ Implementation
         ObjectFiles:=TCmdStrList.Create_no_double;
         SharedLibFiles:=TCmdStrList.Create_no_double;
         StaticLibFiles:=TCmdStrList.Create_no_double;
+        FrameworkFiles:=TCmdStrList.Create_no_double;
       end;
 
 
@@ -298,6 +301,7 @@ Implementation
         ObjectFiles.Free;
         SharedLibFiles.Free;
         StaticLibFiles.Free;
+        FrameworkFiles.Free;
       end;
 
 
@@ -386,6 +390,8 @@ Implementation
             AddStaticCLibrary(linkotherstaticlibs.Getusemask(mask));
            while not linkothersharedlibs.empty do
             AddSharedCLibrary(linkothersharedlibs.Getusemask(mask));
+           while not linkotherframeworks.empty do
+             AddFramework(linkotherframeworks.Getusemask(mask));
            { Known Library/DLL Imports }
            for i:=0 to ImportLibraryList.Count-1 do
              begin
@@ -455,6 +461,15 @@ Implementation
       end;
 
 
+    Procedure TLinker.AddFramework(S:TCmdStr);
+      begin
+        if s='' then
+          exit;
+        { ready to be added }
+        FrameworkFiles.Concat(S);
+      end;
+
+
     Procedure TLinker.AddStaticCLibrary(const S:TCmdStr);
       var
         ns : TCmdStr;

+ 195 - 182
compiler/msg/errord.msg

@@ -1,9 +1,9 @@
 #
-#   German (alternative) Language File for Free Pascal
+#   German (alternative, LATIN-US DOS) Language File for Free Pascal
 #   Latest updates contributed by Karl-Michael Schindler aka mischi
 #   <karl-michael.schindler at physik.uni-halle.de>
 #
-#   Based on errore.msg of SVN revision 7907
+#   Based on errore.msg of SVN revision 8422
 #
 #   This file is part of the Free Pascal Compiler
 #   Copyright (c) 1998-2000 by the Free Pascal Development team
@@ -81,7 +81,7 @@ general_t_objectpath=01007_T_Der Objektdateienpfad: $1
 % When the \var{-vt} switch is used, this line tells you where the compiler
 % looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
 % You can set this path with the \var{-Fo} option.
-general_i_abslines_compiled=01008_I_$1 Zeilen kompiliert, $2 Sekunden$3
+general_i_abslines_compiled=01008_I_$1 Zeilen �bersetzt, $2 Sekunden$3
 % When the \var{-vi} switch is used, the compiler reports the number
 % of lines compiled, and the time it took to compile them (real time,
 % not program time).
@@ -114,7 +114,7 @@ general_i_hint=01016_I_Hinweis:
 % Prefix for Hints
 general_e_path_does_not_exist=01017_E_Der Pfad "$1" existiert nicht
 % The specified path does not exist.
-general_f_compilation_aborted=01018_F_Kompilieren abgebrochen
+general_f_compilation_aborted=01018_F_šbersetzen abgebrochen
 % Compilation was aborted.
 general_text_bytes_code=01019_bytes Code
 general_text_bytes_data=01020_bytes Daten
@@ -128,7 +128,7 @@ general_i_number_of_notes=01023_I_$1 Anmerkung(en) ausgegeben
 #
 # Scanner
 #
-# 02063 is the last used one
+# 02084 is the last used one
 #
 % \section{Scanner messages.}
 % This section lists the messages that the scanner emits. The scanner takes
@@ -348,11 +348,15 @@ scanner_e_illegal_warn_state=02079_E_Ung
 % Only ON and OFF can be used as state with a \$warn compiler directive
 scan_e_only_packset=02080_E_Ung�ltiger Wert f�r das set packing
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
-scan_w_pic_ignored=02081_W_PIC Direktive wird ignoriert
-% Several targets like windows do not support the PIC directive and need it to be
+scan_w_pic_ignored=02081_W_PIC Direktive oder Schalter wird ignoriert
+% Several targets like windows do not support neither need PIC so the PIC directive and switch are
 % ignored.
 scan_w_unsupported_switch_by_target=02082_W_Der Schalter "$1" wird vom derzeit ausgew„hlten Zielbetriebssystem nicht unterst�tzt
-% Some compiler switches like $E are not supported by all targets.
+% Some compiler switches like \$E are not supported by all targets.
+scan_w_frameworks_darwin_only=02084_W_Framework-bezogene Optionen werden nur f�r Darwin/Mac OS X unterst�tzt
+% Frameworks are not a known concept, or at least not supported by FPC, on operating systems other than Darwin/Mac OS X.
+scan_e_illegal_minfpconstprec=02085_E_"$1" ist eine ung�ltige minimale Pr„zision von Fliesskommakonstanten
+% Valid minimal precisions for floating point constants are default, 32 and 64, which mean respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
 % \end{description}
 #
 # Parser
@@ -422,17 +426,17 @@ parser_e_illegal_parameter_list=03024_E_Ung
 parser_e_wrong_parameter_size=03026_E_Falsche Anzahl an Parameter im Aufruf von "$1" angegeben
 % There is an error in the parameter list of the function or procedure,
 % the number of parameters is not correct.
-parser_e_overloaded_no_procedure=03027_E_Bezeichner $1 ist keine Funktion, overload nicht m”glich
+parser_e_overloaded_no_procedure=03027_E_Bezeichner "$1" ist keine Funktion, overload nicht m”glich
 % The compiler encountered a symbol with the same name as an overloaded
 % function, but it isn't a function it can overload.
-parser_e_overloaded_have_same_parameters=03028_E_Overload-Funktion darf nicht eine identische Parameterliste aufweisen
+parser_e_overloaded_have_same_parameters=03028_E_Overload-Funktion darf keine identische Parameterliste aufweisen
 % You're declaring overloaded functions, but with the same parameter list.
 % Overloaded function must have at least 1 different parameter in their
 % declaration.
-parser_e_header_dont_match_forward=03029_E_Funktionskopf ist nicht identisch mit Forward-Deklaration $1
+parser_e_header_dont_match_forward=03029_E_Funktionskopf unterscheidet sich von voriger Deklaration "$1"
 % You declared a function with same parameters but
 % different result type or function specifiers.
-parser_e_header_different_var_names=03030_E_Funktionskopf von $1 passt nicht zur Forward-Deklaration, Variablename „ndert sich: $2 => $3
+parser_e_header_different_var_names=03030_E_Funktionskopf von "$1" passt nicht zur Forward-Deklaration, Variablename „ndert sich: $2 => $3
 % You declared the function in the \var{interface} part, or with the
 % \var{forward} directive, but define it with a different parameter list.
 parser_n_duplicate_enum=03031_N_Werte in Aufz„hlungen m�ssen aufsteigend sein
@@ -637,7 +641,7 @@ parser_e_no_new_or_dispose_for_classes=03086_E_Die erweiterte Syntax von New ode
 parser_e_procedure_overloading_is_off=03088_E_Das šberladen von Prozeduren ist ausgeschaltet
 % When using the \var{-So} switch, procedure overloading is switched off.
 % Turbo Pascal does not support function overloading.
-parser_e_overload_operator_failed=03089_E_Es ist nicht m”glich, dieesen Operator zu �berladen (benutzen Sie stattdessen '=')
+parser_e_overload_operator_failed=03089_E_Es ist nicht m”glich, dieesen Operator zu �berladen. Verwandte �berladbare Operatoren sind "$1"
 % You are trying to overload an operator which cannot be overloaded.
 % The following operators can be overloaded :
 % \begin{verbatim}
@@ -701,7 +705,7 @@ parser_c_macro_undefined=03102_CL_Makrodefinition gel
 % When \var{-vc} is used, the compiler tells you when it undefines macros.
 parser_c_macro_set_to=03103_CL_Wert des Makros $1 auf $2 gesetzt
 % When \var{-vc} is used, the compiler tells you what values macros get.
-parser_i_compiling=03104_I_Kompiliere $1
+parser_i_compiling=03104_I_šbersetze $1
 % When you turn on information messages (\var{-vi}), the compiler tells you
 % what units it is recompiling.
 parser_u_parsing_interface=03105_UL_Parse Interface von Unit $1
@@ -710,7 +714,7 @@ parser_u_parsing_interface=03105_UL_Parse Interface von Unit $1
 parser_u_parsing_implementation=03106_UL_Parse Implementation von $1
 % This tells you that the code reading of the implementation
 % of the current unit, library or program starts
-parser_d_compiling_second_time=03107_DL_Kompiliere $1 zum zweiten Mal
+parser_d_compiling_second_time=03107_DL_šbersetze $1 zum zweiten Mal
 % When you request debug messages (\var{-vd}) the compiler tells you what
 % units it recompiles for the second time.
 parser_e_no_property_found_to_override=03109_E_Es gibt keine Property diesen Namens, die �berschrieben werden k”nnte
@@ -853,7 +857,7 @@ parser_e_ill_property_storage_sym=03155_E_Dieses Symbol ist als Speichersymbol u
 % You can't use this type of symbol as storage specifier in property
 % declaration. You can use only methods with the result type boolean,
 % boolean class fields or boolean constants
-parser_e_only_publishable_classes_can__be_published=03156_E_Nur Klassen, die im "$M+"-Modus kompiliert wurden, d�rfen published sein
+parser_e_only_publishable_classes_can_be_published=03156_E_Nur Klassen, die im "$M+"-Modus �bersetzt wurden, d�rfen published sein
 % In the published section of a class can be only class as fields used which
 % are compiled in $M+ or which are derived from such a class. Normally
 % such a class should be derived from TPersitent
@@ -877,7 +881,7 @@ parser_e_procname_to_short_for_export=03159_E_Prozedurname zu kurz um exportiert
 % long. This is because of a bug in dlltool which doesn't parse the .def
 % file correct with a name of length 1.
 parser_e_dlltool_unit_var_problem=03160_E_Es kann kein DEFFILE-Eintrag f�r unit-globale Variablen erzeugt werden
-parser_e_dlltool_unit_var_problem2=03161_E_Kompiliere ohne "-WD"-Option
+parser_e_dlltool_unit_var_problem2=03161_E_šbersetze ohne "-WD"-Option
 % You need to compile this file without the -WD switch on the
 % commandline
 parser_f_need_objfpc_or_delphi_mode=03162_F_Es muss der Modus ObjFPC (-S2) oder Delphi (-Sd) aktiv sein, um dieses Modul zu �bersetzen
@@ -1143,6 +1147,8 @@ parser_e_no_common_type=03235_E_"$1" und "$2" haben keinen gemeinsamen Typ
 % common type of the operands, the compiler takes the minimum of the minimal values
 % of both types, and the maximum of the maximal values of both types. The common
 % type is then minimum..maximum.
+parser_e_no_generics_as_types=03236_E_Generische Typen k”nnen nicht ohne Spezialisierung als Typ f�r eine Variable verwendet werden
+% Generics must be always specialized before being used as variable type
 % \end{description}
 #
 # Type Checking
@@ -1418,9 +1424,9 @@ type_h_convert_mul_operands_to_prevent_overflow=04081_H_Konvertierung des Operan
 % Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
 % could prevent such errors by converting the operands to this type before doing the multiplication.
 type_w_pointer_to_signed=04082_W_Die Konvertierung von Pointern in einen Integertyp mit Vorzeichen kann zu falschen Ergebnissen bei Vergleichen und zu Bereichs�berschreitungen f�hren; verwenden sie statt dessen besser einen Typ ohne Vorzeichen
-% The virtual address space on 32-bit machines runs from $00000000 to $ffffffff. Many operating systems allow you to
-% allocate memory above $80000000, for example both Windows and Linux allow pointers in the range $0000000 to $bfffffff.
-% If you convert pointers to signed types, this can cause overflow and range check errors, but also $80000000 < $7fffffff.
+% The virtual address space on 32-bit machines runs from \$00000000 to \$ffffffff. Many operating systems allow you to
+% allocate memory above \$80000000, for example both Windows and Linux allow pointers in the range \$0000000 to \$bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors, but also \$80000000 < \$7fffffff.
 % This can cause random errors in code like "if p>q".
 % \end{description}
 #
@@ -2063,7 +2069,7 @@ exec_i_closing_script=09020_I_Schliesse Skript $1
 exec_e_res_not_found=09021_E_Resourcen Compiler nicht gefunden, schalte um zu externem Modus
 % An external resource compiler was not found, the compiler will produce a script that
 % can be used to assemble, compile resources and link or postprocess the program.
-exec_i_compilingresource=09022_I_Kompiliere Resource $1
+exec_i_compilingresource=09022_I_šbersetze Resource $1
 % An informational message, showing which resource is being compiled.
 exec_t_unit_not_static_linkable_switch_to_smart=09023_T_Unit $1 kann nicht statisch gelinkt werden, schalte um zu smart Linken
 % Statical linking was requested, but a unit which is not statically linkable was used.
@@ -2137,10 +2143,10 @@ unit_u_ppu_invalid_header=10007_U_PPU Ung
 unit_u_ppu_invalid_version=10008_U_PPU Ung�ltige Version $1
 % This unit file was compiled with a different version of the compiler, and
 % cannot be read.
-unit_u_ppu_invalid_processor=10009_U_PPU ist f�r einen anderen Prozessor kompiliert
+unit_u_ppu_invalid_processor=10009_U_PPU ist f�r einen anderen Prozessor �bersetzt
 % This unit file was compiled for a different processor type, and
 % cannot be read
-unit_u_ppu_invalid_target=10010_U_PPU ist f�r ein anderes Zielsystem kompiliert
+unit_u_ppu_invalid_target=10010_U_PPU ist f�r ein anderes Zielsystem �bersetzt
 % This unit file was compiled for a different processor type, and
 % cannot be read
 unit_u_ppu_source=10011_U_PPU Quelle: $1
@@ -2223,22 +2229,22 @@ unit_u_check_time=10037_U_PPU pr
 % When you use the \var{-vu} flag, the compiler show the filename and
 % date and time of the file which a recompile depends on
 ### The following two error msgs is currently disabled.
-#unit_h_cond_not_set_in_last_compile=10038_H_Conditional $1 wurde beim Start beim letzten Kompilieren von $2 nicht gesetzt
+#unit_h_cond_not_set_in_last_compile=10038_H_Conditional $1 wurde beim Start beim letzten šbersetzen von $2 nicht gesetzt
 #% when recompilation of an unit is required the compiler will check that
 #% the same conditionals are set for the recompiliation. The compiler has
 #% found a conditional that currently is defined, but was not used the last
 #% time the unit was compiled.
-#unit_h_cond_set_in_last_compile=10039_H_Conditional $1 wurde beim Start beim letzten Kompilieren von $2 gesetzt
+#unit_h_cond_set_in_last_compile=10039_H_Conditional $1 wurde beim Start beim letzten šbersetzen von $2 gesetzt
 #% when recompilation of an unit is required the compiler will check that
 #% the same conditionals are set for the recompiliation. The compiler has
 #% found a conditional that was used the last time the unit was compiled, but
 #% the conditional is currently not defined.
-unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht rekompilieren, aber ge„nderte Include-Datei gefunden
+unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht erneut �bersetzen, aber ge„nderte Include-Datei gefunden
 % A unit was found to have modified include files, but
 % some source files were not found, so recompilation is impossible.
 unit_u_source_modified=10041_U_Datei $1 ist neuer als die PPU Datei $2
 % A modified source file for a compiler unit was found.
-unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode kompiliert wurde
+unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode �bersetzt wurde
 % Trying to compile code while using units which were not compiled with
 % the same floating point format mode. Either all code should be compiled
 % with FPU emulation on, or with FPU emulation off.
@@ -2256,7 +2262,7 @@ unit_u_implementation_crc_changed=10046_U_Ge
 % When you use the \var{-vu} flag, the compiler warns that it the
 % CRC calculated has been changed after the implementation
 % has been parsed.
-unit_u_finished_compiling=10047_U_Kompilieren der Unit $1 beendet
+unit_u_finished_compiling=10047_U_šbersetzen der Unit $1 beendet
 % When you use the \var{-vu} flag, the compiler warns that it
 % has finished compiling the unit.
 unit_u_add_depend_to=10048_U_F�ge die Abh„ngigkeit von $1 von $2 dazu
@@ -2266,7 +2272,7 @@ unit_u_no_reload_is_caller=10049_U_Kein erneutes Laden, Unit $1 ist die Aufrufen
 % When you use the \var{-vu} flag, the compiler warns that it
 % has will not reload the unit because it is the unit that wants
 % to load this unit
-unit_u_no_reload_in_second_compile=10050_U_Kein erneutes Laden der Unit, bereits beim zweiten Kompilieren: $1
+unit_u_no_reload_in_second_compile=10050_U_Kein erneutes Laden der Unit, bereits beim zweiten šbersetzen: $1
 % When you use the \var{-vu} flag, the compiler warns that it
 % has will not reload the unit because it is already in a second recompile
 unit_u_flag_for_reload=10051_U_Flag f�r erneutes Laden: $1
@@ -2278,7 +2284,7 @@ unit_u_forced_reload=10052_U_Erzwungenes erneutes Laden
 unit_u_previous_state=10053_U_Vorhergehender Status von $1: $2
 % When you use the \var{-vu} flag, the compiler shows the
 % previous state of the unit
-unit_u_second_compile_unit=10054_U_$1 wird bereits kompiliert, zweites Kompilieren gesetzt
+unit_u_second_compile_unit=10054_U_$1 wird bereits �bersetzt, zweites šbersetzen gesetzt
 % When you use the \var{-vu} flag, the compiler warns that it starts
 % recompiling a unit for the second time. This can happend with interdepend
 % units.
@@ -2354,7 +2360,7 @@ option_no_debug_support=11016_W_Erzeugung von Debug-Informationen wird von diese
 % It is possible to have a compiler executable that doesn't support
 % the generation of debugging info. If you use such an executable with the
 % \var{-g} switch, this warning will be displayed.
-option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu kompilieren
+option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu �bersetzen
 % It is possible to have a compiler executable that doesn't support
 % the generation of debugging info. If you use such an executable with the
 % \var{-g} switch, this warning will be displayed.
@@ -2459,151 +2465,155 @@ Fehlerberichte, Vorschl
 #  The third character represents the indentation level.
 #
 option_help_pages=11025_[
-**0*_nach booleschen Optionen geben Sie + zum Ein- bzw. - zum Ausschalten an
-**1a_l”sche die erzeugte Assembler-Datei nicht
-**2al_liste Quellcode-Zeilen in der Assembler-Datei
-**2an_liste "node info" in der Assembler-Datei
-*L2ap_benutze Pipes anstelle tempor„rer Assembler-Dateien
-**2ar_liste Registerbelegungsinformation in Assembler-Datei
-**2at_liste Temp. Variablenbelegungsinfo in Assembler-Datei
+**0*_Nach booleschen Optionen geben Sie + zum Ein- bzw. - zum Ausschalten an
+**1a_L”sche die erzeugte Assembler-Datei nicht
+**2al_Liste Quellcode-Zeilen in der Assembler-Datei
+**2an_Liste "node info" in der Assembler-Datei
+*L2ap_Benutze Pipes anstelle tempor„rer Assembler-Dateien
+**2ar_Liste Registerbelegungsinformation in Assembler-Datei
+**2at_Liste Temp. Variablenbelegungsinfo in Assembler-Datei
 **1A<x>_Ausgabe Format:
-**2Adefault_benutze den "default" Assembler
-3*2Aas_assembliere mit Hilfe von GNU AS
-3*2Anasmcoff_coff (Go32v2) Datei mit Hilfe von Nasm
-3*2Anasmelf_elf32 (Linux) Datei mit Hilfe von Nasm
+**2Adefault_Benutze den "default" Assembler
+3*2Aas_Assembliere mit Hilfe von GNU AS
+3*2Anasmcoff_COFF (Go32v2) Datei mit Hilfe von Nasm
+3*2Anasmelf_ELF32 (Linux) Datei mit Hilfe von Nasm
 3*2Anasmwin32_Win32 Object Datei mit Hilfe von Nasm
 3*2Anasmwdosx_Win32/WDOSX Object Datei mit Hilfe von Nasm
 3*2Awasm_obj Datei mit Hilfe von Wasm (Watcom)
-3*2Anasmobj_obj Datei mit Hilfe von Nasm
-3*2Amasm_obj Datei mit Hilfe von Masm (Microsoft)
-3*2Atasm_obj Datei mit Hilfe von Tasm (Borland)
-3*2Aelf_elf32 (Linux) mit Hilfe von internen Schreiber
-3*2Acoff_coff (Go32v2) mit Hilfe von internen Schreiber
-3*2Apecoff_pecoff (Win32) mit Hilfe von internen Schreiber
-4*2Aas_assembliere mit Hilfe von GNU AS
+3*2Anasmobj_Obj Datei mit Hilfe von Nasm
+3*2Amasm_Obj Datei mit Hilfe von Masm (Microsoft)
+3*2Atasm_Obj Datei mit Hilfe von Tasm (Borland)
+3*2Aelf_ELF32 (Linux) mit Hilfe von internen Schreiber
+3*2Acoff_COFF (Go32v2) mit Hilfe von internen Schreiber
+3*2Apecoff_PE_COFF (Win32) mit Hilfe von internen Schreiber
+4*2Aas_Assembliere mit Hilfe von GNU AS
 6*2Aas_Unix o-file mit Hilfe von GNU AS
 6*2Agas_GNU Motorola Assembler
 6*2Amit_MIT Syntax (old GAS)
 6*2Amot_Standard Motorola Assembler
-A*2Aas_assembliere mit Hilfe von GNU AS
-P*2Aas_assembliere mit Hilfe von GNU AS
-S*2Aas_assembliere mit Hilfe von GNU AS
-**1b_erzeuge Browser-Info
-**2bl_erzeuge Info zu lokalen Symbolen
-**1B_erzeuge alle Module (Build)
+A*2Aas_Assembliere mit Hilfe von GNU AS
+P*2Aas_Assembliere mit Hilfe von GNU AS
+S*2Aas_Assembliere mit Hilfe von GNU AS
+**1b_Erzeuge Browser-Info
+**2bl_Erzeuge Info zu lokalen Symbolen
+**1B_Erzeuge alle Module (Build)
 **1C<x>_Optionen f�r Code-Erzeugung:
 **2Cc<x>_Setze "default calling convention" zu <x>
-**2CD_erzeuge auch eine dynamische Bibliothek (nicht unterst�tzt)
-**2Ce_Kompiliere mit emulierten Fliesskomma opcodes
-**2Cf<x>_w„hle den Fliesskomma instruction set aus, siehe fpc -i wegen m”glicher Werte
-**2Cg_erzeuge PIC code
+**2CD_Erzeuge auch eine dynamische Bibliothek (nicht unterst�tzt)
+**2Ce_šbersetze mit emulierten Fliesskomma opcodes
+**2Cf<x>_W„hle den Fliesskomma instruction set aus, siehe fpc -i wegen m”glicher Werte
+**2CF<x>_Minimale Pr„zission von Fliesskommakonstanten (default, 32, 64)
+**2Cg_Erzeuge PIC code
 **2Ch<n>_<n> Bytes Heap (zwischen 1023 und 67107840)
 **2Ci_I/O-Pr�fung
-**2Cn_lasse die Linkstufe aus
-**2Co_pr�fe šberlauf von Integer-Operationen
-**2Cp<x>_w„hle instruction set aus, siehe fpc -i wegen m”glicher Werte
+**2Cn_Lasse die Linkstufe aus
+**2Co_Pr�fe šberlauf von Integer-Operationen
+**2Cp<x>_W„hle instruction set aus, siehe fpc -i wegen m”glicher Werte
 **2CP<x>=<y>_ Einstellungen f�r packing
 **3CPPACKSET=<y>_ <y> Belegung von Sets: 0, 1 oder DEFAULT oder NORMAL, 2, 4 und 8
-**2Cr_f�hre Bereichspr�fung durch
-**2CR_verifiziere die G�ltigkiet des Aufrufs der Objektmethoden
-**2Cs<n>_setze Gr”sse des Stacks auf <n>
-**2Ct_f�hre Stackpr�fung durch
-**2Cx_benutze Smartlinking
-**1d<x>_definiere das Symbol <x>
-**1D_erzeuge eine DEF-Datei
-**2Dd<x>_setze Beschreibung zu <x>
-**2Dv<x>_setze DLL Version zu <x>
-*O2Dw_erzeuge PM-Anwendung
-**1e<x>_setze Pfad zur ausf�hrbaren Datei
-**1E_genau wie -Cn
-**1fPIC_genau wie -Cg
+**2Cr_F�hre Bereichspr�fung durch
+**2CR_Verifiziere die G�ltigkiet des Aufrufs der Objektmethoden
+**2Cs<n>_Setze Gr”sse des Stacks auf <n>
+**2Ct_F�hre Stackpr�fung durch
+**2Cx_Benutze Smartlinking
+**1d<x>_Definiere das Symbol <x>
+**1D_Erzeuge eine DEF-Datei
+**2Dd<x>_Setze Beschreibung zu <x>
+**2Dv<x>_Setze DLL Version zu <x>
+*O2Dw_Erzeuge PM-Anwendung
+**1e<x>_Setze Pfad zur ausf�hrbaren Datei
+**1E_Genau wie -Cn
+**1fPIC_Genau wie -Cg
 **1F<x>_Dateinamen und Pfade:
-**2Fa<x>[,y]_ein Program soll die Units <x> und [y] laden, bevor uses analysiert wird
-**2Fc<x>_setze die Eingabe-Codepage zu <x>
-**2FD<x>_setze das Verzeichnis f�r die Compiler-Hilfsprogramme
-**2Fe<x>_leite die Fehlerausgabe um nach <x>
-**2FE<x>_setze den Pfad f�r Exe/Unit-Dateien auf <x>
-**2Fi<x>_erg„nze <x> zum Include-Pfad
-**2Fl<x>_erg„nze <x> zum Bibliotheks-Pfad
-**2FL<x>_benutze <x> als dynamischen Linker
-**2Fm<x>_lade die Unicode-Konversionstabelle aus <x>.txt im Compiler-Verzeichnis
-**2Fo<x>_erg„nze <x> zum Objektdatei-Pfad
-**2Fr<x>_lade die Fehler-Meldungs Datei <x>
-**2Fu<x>_erg„nze <x> zum Unit-Pfad
-**2FU<x>_Units werden nach <x> ausgegen, hat Vorrang vor -FE
-*g1g<x>_erzeuge Informationen zur Fehlersuche:
+**2Fa<x>[,y]_Ein Program soll die Units <x> und [y] laden, bevor uses analysiert wird
+**2Fc<x>_Setze die Eingabe-Codepage zu <x>
+**2FC<x>_Setze den Namen des RC Compiler-Bin„rprograms auf <x>
+**2FD<x>_Setze das Verzeichnis f�r die Compiler-Hilfsprogramme
+**2Fe<x>_Leite die Fehlerausgabe um nach <x>
+**2Ff<x>_Erg„nze <x> zum Framework-Pfad (nur Darwin)
+**2FE<x>_Setze den Pfad f�r Exe/Unit-Dateien auf <x>
+**2Fi<x>_Erg„nze <x> zum Include-Pfad
+**2Fl<x>_Erg„nze <x> zum Bibliotheks-Pfad
+**2FL<x>_Benutze <x> als dynamischen Linker
+**2Fm<x>_Lade die Unicode-Konversionstabelle aus <x>.txt im Compiler-Verzeichnis
+**2Fo<x>_Erg„nze <x> zum Objektdatei-Pfad
+**2Fr<x>_Lade die Fehler-Meldungs Datei <x>
+**2FR<x>_Setze den Resource (.res) Linker auf <x>
+**2Fu<x>_Erg„nze <x> zum Unit-Pfad
+**2FU<x>_Units werden nach <x> ausgegeben, hat Vorrang vor -FE
+*g1g<x>_Erzeuge Informationen zur Fehlersuche:
 *g2gc_Zeiger�berpr�fung
-*g2gd_Verwende dbx
-*g2gg_Verwende gsym
 *g2gh_Heaptrace-Unit einbinden
-*g2gl_line info Unit einbinden, um mehr backtrace Informationen anzuzeigen
-*g2gp_erhalte Gross/Kleinschreibung in Stabs-Symbolnamen
-*g2gt_l”sche lokale Variablen (um eine Verwendung ohne Initialisierung zu finden)
-*g2gv_erzeuge ein mit valgrind verfolgbares (traceable) Programm
-*g2gw_erzeuge dwarf Informationen
-**1i_zeige alle Information �ber den Compiler
-**2iD_zeige Compilerdatum
-**2iV_zeige Compilerversion
-**2iW_zeige vollst„ndige Compilerversion
-**2iSO_zeige Compilerbetriebssystem
-**2iSP_zeige Compilerprozessor
-**2iTO_zeige Zielbetriebssystem
-**2iTP_zeige Zielprozessor
-**1I<x>_erg„nze <x> zum Include-Pfad
-**1k<x>_�bergebe <x> an den Linker
-**1l_zeige Logo
-**1M<x>_setze Sprachmodus zu <x>
+*g2gl_Line info Unit einbinden, um mehr backtrace Informationen anzuzeigen
+*g2go<x>_Setze Optionen f�r die Debug Informationen
+*g3godwarfsets_Schalte Dwarf Debug Informationen f�r Mengen (sets) ein (verhindert debugging mit gdb < 6.5)
+*g2gp_Erhalte Gross/Kleinschreibung in Stabs-Symbolnamen
+*g2gt_L”sche lokale Variablen (um eine Verwendung ohne Initialisierung zu finden)
+*g2gv_Erzeuge ein mit valgrind verfolgbares (traceable) Programm
+*g2gw_Erzeuge dwarf Informationen
+**1i_Zeige alle Information �ber den Compiler
+**2iD_Zeige Compilerdatum
+**2iV_Zeige Compilerversion
+**2iW_Zeige vollst„ndige Compilerversion
+**2iSO_Zeige Compilerbetriebssystem
+**2iSP_Zeige Compilerprozessor
+**2iTO_Zeige Zielbetriebssystem
+**2iTP_Zeige Zielprozessor
+**1I<x>_Erg„nze <x> zum Include-Pfad
+**1k<x>_šbergebe <x> an den Linker
+**1l_Zeige Logo
+**1M<x>_Setze Sprachmodus zu <x>
 **2Mfpc_Free Pascal Dialekt (Voreinstellung)
-**2Mobjfpc_schalte einige Delphi 2 Erweiterungen ein
-**2Mdelphi_versuche zu Delphi kompatibel zu sein
-**2Mtp_versuche zu TP/BP 7.0 kompatibel zu sein
-**2Mmacpas_versuche zu den MacIntosh Pascal-Dialekten kompatibel zu sein
+**2Mobjfpc_Schalte einige Delphi 2 Erweiterungen ein
+**2Mdelphi_Versuche zu Delphi kompatibel zu sein
+**2Mtp_Versuche zu TP/BP 7.0 kompatibel zu sein
+**2Mmacpas_Versuche zu den MacIntosh Pascal-Dialekten kompatibel zu sein
 **1n_Standard-Konfigurationsdatei ignorieren
-**1N<x>_node tree Optimierung
-**2Nu_unroll loops
-**1o<x>_die erzeugte, ausf�hrbare Datei bekommt den Namen <x>
+**1N<x>_Node tree Optimierung
+**2Nu_Unroll loops
+**1o<x>_Die erzeugte, ausf�hrbare Datei bekommt den Namen <x>
 **1O<x>_Optimierungen:
 **2O-_Optimierungen ausschalten
-**2O1_level 1 Optimierung (schnell und Debugger freundlich)
-**2O2_level 2 Optimierung (-O1 + schnelle Optimierungen)
-**2O3_level 3 Optimierung (-O2 + langsame Optimierungen)
+**2O1_Level 1 Optimierung (schnell und Debugger freundlich)
+**2O2_Level 2 Optimierung (-O1 + schnelle Optimierungen)
+**2O3_Level 3 Optimierung (-O2 + langsame Optimierungen)
 **2Oa<x>=<y>_Ausrichtung (alignment) von Mengen
 **2Oo[NO]<x>_Optimierungen ein- oder ausschalten, siehe fpc -i f�r m”gliche Werte
-**2Op<x>_setze Zielprozessor f�r die Optimierung, siehe fpc -i f�r m”gliche Werte
-**2Os_erzeuge k�rzeren Code
-**1pg_erzeuge Profiler-Code f�r gprof
+**2Op<x>_Setze Zielprozessor f�r die Optimierung, siehe fpc -i f�r m”gliche Werte
+**2Os_Erzeuge k�rzeren Code
+**1pg_Erzeuge Profiler-Code f�r gprof
 **1R<x>_Assembler Code Format:
-**2Rdefault_benutze den default Assembler
-3*2Ratt_lese Assembler Code im AT&T Format
-3*2Rintel_lese Assembler im Intel Format
-6*2RMOT_lese Assembler im Motorola Format
+**2Rdefault_Benutze den default Assembler
+3*2Ratt_Lese Assembler Code im AT&T Format
+3*2Rintel_Lese Assembler im Intel Format
+6*2RMOT_Lese Assembler im Motorola Format
 **1S<x>_Syntax-Optionen:
-**2S2_schalte einige der Delphi 2 Erweiterungen ein (wie -Mobjfpc)
-**2Sc_unterst�tze spezielle C Operatoren (*=,+=,/= and -=)
-**2Sa_erlaube assertion code.
-**2Sd_sei Delphi-kompatibel (wie -Mdelphi)
+**2S2_Schalte einige der Delphi 2 Erweiterungen ein (wie -Mobjfpc)
+**2Sc_Unterst�tze spezielle C Operatoren (*=,+=,/= and -=)
+**2Sa_Erlaube assertion code.
+**2Sd_Sei Delphi-kompatibel (wie -Mdelphi)
 **2Se<x>_Fehler Optionen. <x> ist eine der folgenden Kombinationen:
 **3*_<n> : Compiler h„lt nach <n> Fehlern (Voreinstellung ist 1)
 **3*_w : Compiler h„lt auch nach Warnungen
 **3*_n : Compiler h„lt auch nach Anmerkungen
 **3*_h : Compiler h„lt auch nach Hinweisen
-**2Sg_erlaube LABEL und GOTO
-**2Sh_benutze ANSI-Strings
-**2Si_benutze C++ artige INLINE
-**2Sk_lade fpcylix Unit
-**2SI<x>_setze den Stil des Interface zu <x>
+**2Sg_Erlaube LABEL und GOTO
+**2Sh_Benutze ANSI-Strings
+**2Si_Benutze C++ artige INLINE
+**2Sk_Lade fpcylix Unit
+**2SI<x>_Setze den Stil des Interface zu <x>
 **3SIcom_COM kompatibles Interface (Voreinstellung)
 **3SIcorba_CORBA kompatibles Interface
-**2Sm_unterst�tze Makros wie in C (global)
-**2So_sei TP/BP 7.0 kompatibel (wie -Mtp)
-**2Sp_sei gpc-kompatibel (wie -Mgpc)
-**2Ss_Kon-und Destruktorname m�ssen "Init" und "Done" sein
-**2St_erlaube Schl�sselwort static in Objekten
+**2Sm_Unterst�tze Makros wie in C (global)
+**2So_Sei TP/BP 7.0 kompatibel (wie -Mtp)
+**2Sp_Sei gpc-kompatibel (wie -Mgpc)
+**2Ss_Konstruktor- und Destruktorname m�ssen "Init" und "Done" sein
+**2St_Erlaube Schl�sselwort static in Objekten
 **2Sx_Exception Schl�sselw”rter einschalten (Voreinstellung in Delphi/ObjFPC Moden)
-**1s_rufe weder Assembler noch Linker auf (nur mit -a)
-**2sh_erzeuge Script um auf dem Host zu linken
-**2st_erzeuge Script um auf dem Zielsystem zu linken
-**2sr_berspringe die Phase der "register allocation" (mit -alr benutzen)
+**1s_Rufe weder Assembler noch Linker auf (nur mit -a)
+**2sh_Erzeuge Script um auf dem Host zu linken
+**2st_Erzeuge Script um auf dem Zielsystem zu linken
+**2sr_šberspringe die Phase der "register allocation" (mit -alr benutzen)
 **1T<x>_Zielbetriebssystem::
 3*2Temx_OS/2 via EMX (einschliesslich EMX/RSX extender)
 3*2Tfreebsd_FreeBSD
@@ -2633,51 +2643,54 @@ P*2Tlinux_Linux auf PowerPC
 P*2Tmacos_Mac OS (classic) auf PowerPC
 P*2Tmorphos_MorphOS
 S*2Tlinux_Linux
-**1u<x>_entferne die Definition f�r das Symbol <x>
+**1u<x>_Entferne die Definition f�r das Symbol <x>
 **1U<x>_Unit-Optionen:
-**2Un_pr�fe den Unitnamen nicht
-**2Ur_erzeuge release unit Dateien
-**2Us_erzeuge eine Systemunit
+**2Un_Pr�fe den Unitnamen nicht
+**2Ur_Erzeuge release unit Dateien
+**2Us_Erzeuge eine Systemunit
 **1v<x>_Meldungen, <x> ist eine Kombination der folgenden Zeichen:
-**2*_e : Fehler (Standard)             0 : nichts (ausser Fehlern)
-**2*_w : Warnungen                     u : Unit Info
-**2*_n : Anmerkungen                   t : angesprochene/benutzte Dateien
-**2*_h : Hinweise                      c : Preprozessordirective
-**2*_i : allgemeine Info               d : Debug Info
+**2*_e : Fehler (Standard)             0 : Nichts (ausser Fehlern)
+**2*_w : Warnungen                     u : Unit Informationen
+**2*_n : Anmerkungen                   t : Angesprochene/benutzte Dateien
+**2*_h : Hinweise                      c : Preprozessordirektive
+**2*_i : Allgemeine Informationen      d : Debug Informationen
 **2*_l : Zeilennummern                 r : Rhide/GCC kompatibler Modus
-**2*_a : alles                         x : Exe-Datei Info (nur Win32)
-**2*_b : schreibe bei Meldungen mit Dateinamen den vollst„ndigem Pfad
-**2*_v : schreibe fpcdebug.txt mit     p : schreibe tree.log mit Analysenbaum (parse tree)
-**2*_   ganz viel Informationen
+**2*_a : Alles                         x : Exe-Datei Informationen (nur Win32)
+**2*_b : Schreibe bei Meldungen mit Dateinamen den vollst„ndigem Pfad
+**2*_v : Schreibe fpcdebug.txt mit     p : Schreibe tree.log mit Analysenbaum (parse tree)
+**2*_   ganz viel Information
 3*1W<x>_Win32-„hnliche Ziel-Optionen
-3*2WB_erzeuge ein relozierbares Image
-3*2WB<x>_Setze Image base auf den Hexadecimal Wert <x>
-3*2WC_spezifiziere "console type application"
-3*2WD_benutze DEFFILE um Funtionen der DLL oder EXE zu exportieren
-3*2WF_spezifiziere "full-screen type application" (nur OS/2)
-3*2WG_spezifiziere "graphic type application"
-3*2WN_erzeuge keinen "relocation code" (notwendig f�r debugging)
-3*2WR_erzeuge "relocation code"
-P*2WC_spezifiziere "console type application" (nur Mac OS)
-P*2WG_spezifiziere "graphic type application" (nur Mac OS)
-P*2WT_spezifiziere "tool type application"    (MPW tool, nur Mac OS)
+3*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+P*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+p*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+3*2WB_Erzeuge ein relozierbares Image
+3*2WB<x>_Setze die Image base auf den Hexadecimal Wert <x>
+3*2WC_Spezifiziere "console type application"
+3*2WD_Benutze DEFFILE um Funktionen der DLL oder EXE zu exportieren
+3*2WF_Spezifiziere "full-screen type application" (nur OS/2)
+3*2WG_Spezifiziere "graphic type application"
+3*2WN_Erzeuge keinen "relocation code" (notwendig f�r debugging)
+3*2WR_Erzeuge "relocation code"
+P*2WC_Spezifiziere "console type application" (nur Mac OS)
+P*2WG_Spezifiziere "graphic type application" (nur Mac OS)
+P*2WT_Spezifiziere "tool type application"    (MPW tool, nur Mac OS)
 **1X_Programm-Optionen:
-**2Xc_�bergebe --shared an den Linker (nur Unix)
-**2Xd_den Standard Bibliotheks-Suchphad NICHT nutzen (ben”tigt f�r cross compile)
-**2Xe_verwende den externen Linker
-**2XD_versuche Units dynamisch zu linken             (definiert FPC_LINK_DYNAMIC)
-**2Xi_verwende den internen Linker
-**2Xm_erzeuge die "link map"
-**2XM<x>_setze den Namen der 'main' program Routine   (default ist 'main')
-**2XP<x>_stelle den Namen der Compiler-Hilfsprogrammen den Prefix <x> voran
-**2Xr<x>_setze den Bibliotheks-Suchpfad zu <x>       (ben”tigt f�r cross compile)
-**2Xs_entferne alle Symbole von ausf�hrbarer Datei
-**2XS_versuche Units statisch zu linken (default)    (definiert FPC_LINK_STATIC)
-**2Xt_linke mit statischen Bibliotheken              (-static wird an den Linker �bergeben)
-**2XX_versuche Units smart zu linken                 (definiert FPC_LINK_SMART)
+**2Xc_šbergebe --shared an den Linker (nur Unix)
+**2Xd_Den Standard Bibliotheks-Suchpfad NICHT nutzen (ben”tigt f�r cross compile)
+**2Xe_Verwende den externen Linker
+**2XD_Versuche Units dynamisch zu linken             (definiert FPC_LINK_DYNAMIC)
+**2Xi_Verwende den internen Linker
+**2Xm_Erzeuge die "link map"
+**2XM<x>_Setze den Namen der 'main' program Routine   (default ist 'main')
+**2XP<x>_Stelle den Namen der Compiler-Hilfsprogrammen den Prefix <x> voran
+**2Xr<x>_Setze den Bibliotheks-Suchpfad zu <x>       (ben”tigt f�r cross compile)
+**2Xs_Entferne alle Symbole von ausf�hrbarer Datei
+**2XS_Versuche Units statisch zu linken (default)    (definiert FPC_LINK_STATIC)
+**2Xt_Linke mit statischen Bibliotheken              (-static wird an den Linker �bergeben)
+**2XX_Versuche Units smart zu linken                 (definiert FPC_LINK_SMART)
 **1*_
-**1?_zeigt diese Hilfe an
-**1h_zeigt diese Hilfe ohne Warten an
+**1?_Zeigt diese Hilfe an
+**1h_Zeigt diese Hilfe ohne Warten an
 ]
 
 #

+ 195 - 182
compiler/msg/errordu.msg

@@ -3,7 +3,7 @@
 #   Latest updates contributed by Karl-Michael Schindler aka mischi
 #   <karl-michael.schindler at physik.uni-halle.de>
 #
-#   Based on errore.msg of SVN revision 7907
+#   Based on errore.msg of SVN revision 8422
 #
 #   This file is part of the Free Pascal Compiler
 #   Copyright (c) 1998-2000 by the Free Pascal Development team
@@ -81,7 +81,7 @@ general_t_objectpath=01007_T_Der Objektdateienpfad: $1
 % When the \var{-vt} switch is used, this line tells you where the compiler
 % looks for object files you link in (files used in \var{\{\$L xxx\}} statements).
 % You can set this path with the \var{-Fo} option.
-general_i_abslines_compiled=01008_I_$1 Zeilen kompiliert, $2 Sekunden$3
+general_i_abslines_compiled=01008_I_$1 Zeilen übersetzt, $2 Sekunden$3
 % When the \var{-vi} switch is used, the compiler reports the number
 % of lines compiled, and the time it took to compile them (real time,
 % not program time).
@@ -114,7 +114,7 @@ general_i_hint=01016_I_Hinweis:
 % Prefix for Hints
 general_e_path_does_not_exist=01017_E_Der Pfad "$1" existiert nicht
 % The specified path does not exist.
-general_f_compilation_aborted=01018_F_Kompilieren abgebrochen
+general_f_compilation_aborted=01018_F_Übersetzen abgebrochen
 % Compilation was aborted.
 general_text_bytes_code=01019_bytes Code
 general_text_bytes_data=01020_bytes Daten
@@ -128,7 +128,7 @@ general_i_number_of_notes=01023_I_$1 Anmerkung(en) ausgegeben
 #
 # Scanner
 #
-# 02063 is the last used one
+# 02084 is the last used one
 #
 % \section{Scanner messages.}
 % This section lists the messages that the scanner emits. The scanner takes
@@ -348,11 +348,15 @@ scanner_e_illegal_warn_state=02079_E_Ungültiger Wert für die $WARN Direktive
 % Only ON and OFF can be used as state with a \$warn compiler directive
 scan_e_only_packset=02080_E_Ungültiger Wert für das set packing
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
-scan_w_pic_ignored=02081_W_PIC Direktive wird ignoriert
-% Several targets like windows do not support the PIC directive and need it to be
+scan_w_pic_ignored=02081_W_PIC Direktive oder Schalter wird ignoriert
+% Several targets like windows do not support neither need PIC so the PIC directive and switch are
 % ignored.
 scan_w_unsupported_switch_by_target=02082_W_Der Schalter "$1" wird vom derzeit ausgewählten Zielbetriebssystem nicht unterstützt
-% Some compiler switches like $E are not supported by all targets.
+% Some compiler switches like \$E are not supported by all targets.
+scan_w_frameworks_darwin_only=02084_W_Framework-bezogene Optionen werden nur für Darwin/Mac OS X unterstützt
+% Frameworks are not a known concept, or at least not supported by FPC, on operating systems other than Darwin/Mac OS X.
+scan_e_illegal_minfpconstprec=02085_E_"$1" ist eine ungültige minimale Präzision von Fliesskommakonstanten
+% Valid minimal precisions for floating point constants are default, 32 and 64, which mean respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
 % \end{description}
 #
 # Parser
@@ -422,17 +426,17 @@ parser_e_illegal_parameter_list=03024_E_Ungültige Parameterliste
 parser_e_wrong_parameter_size=03026_E_Falsche Anzahl an Parameter im Aufruf von "$1" angegeben
 % There is an error in the parameter list of the function or procedure,
 % the number of parameters is not correct.
-parser_e_overloaded_no_procedure=03027_E_Bezeichner $1 ist keine Funktion, overload nicht möglich
+parser_e_overloaded_no_procedure=03027_E_Bezeichner "$1" ist keine Funktion, overload nicht möglich
 % The compiler encountered a symbol with the same name as an overloaded
 % function, but it isn't a function it can overload.
-parser_e_overloaded_have_same_parameters=03028_E_Overload-Funktion darf nicht eine identische Parameterliste aufweisen
+parser_e_overloaded_have_same_parameters=03028_E_Overload-Funktion darf keine identische Parameterliste aufweisen
 % You're declaring overloaded functions, but with the same parameter list.
 % Overloaded function must have at least 1 different parameter in their
 % declaration.
-parser_e_header_dont_match_forward=03029_E_Funktionskopf ist nicht identisch mit Forward-Deklaration $1
+parser_e_header_dont_match_forward=03029_E_Funktionskopf unterscheidet sich von voriger Deklaration "$1"
 % You declared a function with same parameters but
 % different result type or function specifiers.
-parser_e_header_different_var_names=03030_E_Funktionskopf von $1 passt nicht zur Forward-Deklaration, Variablename ändert sich: $2 => $3
+parser_e_header_different_var_names=03030_E_Funktionskopf von "$1" passt nicht zur Forward-Deklaration, Variablename ändert sich: $2 => $3
 % You declared the function in the \var{interface} part, or with the
 % \var{forward} directive, but define it with a different parameter list.
 parser_n_duplicate_enum=03031_N_Werte in Aufzählungen müssen aufsteigend sein
@@ -637,7 +641,7 @@ parser_e_no_new_or_dispose_for_classes=03086_E_Die erweiterte Syntax von New ode
 parser_e_procedure_overloading_is_off=03088_E_Das Überladen von Prozeduren ist ausgeschaltet
 % When using the \var{-So} switch, procedure overloading is switched off.
 % Turbo Pascal does not support function overloading.
-parser_e_overload_operator_failed=03089_E_Es ist nicht möglich, dieesen Operator zu überladen (benutzen Sie stattdessen '=')
+parser_e_overload_operator_failed=03089_E_Es ist nicht möglich, dieesen Operator zu überladen. Verwandte überladbare Operatoren sind "$1"
 % You are trying to overload an operator which cannot be overloaded.
 % The following operators can be overloaded :
 % \begin{verbatim}
@@ -701,7 +705,7 @@ parser_c_macro_undefined=03102_CL_Makrodefinition gelöscht: $1
 % When \var{-vc} is used, the compiler tells you when it undefines macros.
 parser_c_macro_set_to=03103_CL_Wert des Makros $1 auf $2 gesetzt
 % When \var{-vc} is used, the compiler tells you what values macros get.
-parser_i_compiling=03104_I_Kompiliere $1
+parser_i_compiling=03104_I_Übersetze $1
 % When you turn on information messages (\var{-vi}), the compiler tells you
 % what units it is recompiling.
 parser_u_parsing_interface=03105_UL_Parse Interface von Unit $1
@@ -710,7 +714,7 @@ parser_u_parsing_interface=03105_UL_Parse Interface von Unit $1
 parser_u_parsing_implementation=03106_UL_Parse Implementation von $1
 % This tells you that the code reading of the implementation
 % of the current unit, library or program starts
-parser_d_compiling_second_time=03107_DL_Kompiliere $1 zum zweiten Mal
+parser_d_compiling_second_time=03107_DL_Übersetze $1 zum zweiten Mal
 % When you request debug messages (\var{-vd}) the compiler tells you what
 % units it recompiles for the second time.
 parser_e_no_property_found_to_override=03109_E_Es gibt keine Property diesen Namens, die überschrieben werden könnte
@@ -853,7 +857,7 @@ parser_e_ill_property_storage_sym=03155_E_Dieses Symbol ist als Speichersymbol u
 % You can't use this type of symbol as storage specifier in property
 % declaration. You can use only methods with the result type boolean,
 % boolean class fields or boolean constants
-parser_e_only_publishable_classes_can__be_published=03156_E_Nur Klassen, die im "$M+"-Modus kompiliert wurden, dürfen published sein
+parser_e_only_publishable_classes_can_be_published=03156_E_Nur Klassen, die im "$M+"-Modus übersetzt wurden, dürfen published sein
 % In the published section of a class can be only class as fields used which
 % are compiled in $M+ or which are derived from such a class. Normally
 % such a class should be derived from TPersitent
@@ -877,7 +881,7 @@ parser_e_procname_to_short_for_export=03159_E_Prozedurname zu kurz um exportiert
 % long. This is because of a bug in dlltool which doesn't parse the .def
 % file correct with a name of length 1.
 parser_e_dlltool_unit_var_problem=03160_E_Es kann kein DEFFILE-Eintrag für unit-globale Variablen erzeugt werden
-parser_e_dlltool_unit_var_problem2=03161_E_Kompiliere ohne "-WD"-Option
+parser_e_dlltool_unit_var_problem2=03161_E_Übersetze ohne "-WD"-Option
 % You need to compile this file without the -WD switch on the
 % commandline
 parser_f_need_objfpc_or_delphi_mode=03162_F_Es muss der Modus ObjFPC (-S2) oder Delphi (-Sd) aktiv sein, um dieses Modul zu übersetzen
@@ -1143,6 +1147,8 @@ parser_e_no_common_type=03235_E_"$1" und "$2" haben keinen gemeinsamen Typ
 % common type of the operands, the compiler takes the minimum of the minimal values
 % of both types, and the maximum of the maximal values of both types. The common
 % type is then minimum..maximum.
+parser_e_no_generics_as_types=03236_E_Generische Typen können nicht ohne Spezialisierung als Typ für eine Variable verwendet werden
+% Generics must be always specialized before being used as variable type
 % \end{description}
 #
 # Type Checking
@@ -1418,9 +1424,9 @@ type_h_convert_mul_operands_to_prevent_overflow=04081_H_Konvertierung des Operan
 % Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
 % could prevent such errors by converting the operands to this type before doing the multiplication.
 type_w_pointer_to_signed=04082_W_Die Konvertierung von Pointern in einen Integertyp mit Vorzeichen kann zu falschen Ergebnissen bei Vergleichen und zu Bereichsüberschreitungen führen; verwenden sie statt dessen besser einen Typ ohne Vorzeichen
-% The virtual address space on 32-bit machines runs from $00000000 to $ffffffff. Many operating systems allow you to
-% allocate memory above $80000000, for example both Windows and Linux allow pointers in the range $0000000 to $bfffffff.
-% If you convert pointers to signed types, this can cause overflow and range check errors, but also $80000000 < $7fffffff.
+% The virtual address space on 32-bit machines runs from \$00000000 to \$ffffffff. Many operating systems allow you to
+% allocate memory above \$80000000, for example both Windows and Linux allow pointers in the range \$0000000 to \$bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors, but also \$80000000 < \$7fffffff.
 % This can cause random errors in code like "if p>q".
 % \end{description}
 #
@@ -2063,7 +2069,7 @@ exec_i_closing_script=09020_I_Schliesse Skript $1
 exec_e_res_not_found=09021_E_Resourcen Compiler nicht gefunden, schalte um zu externem Modus
 % An external resource compiler was not found, the compiler will produce a script that
 % can be used to assemble, compile resources and link or postprocess the program.
-exec_i_compilingresource=09022_I_Kompiliere Resource $1
+exec_i_compilingresource=09022_I_Übersetze Resource $1
 % An informational message, showing which resource is being compiled.
 exec_t_unit_not_static_linkable_switch_to_smart=09023_T_Unit $1 kann nicht statisch gelinkt werden, schalte um zu smart Linken
 % Statical linking was requested, but a unit which is not statically linkable was used.
@@ -2137,10 +2143,10 @@ unit_u_ppu_invalid_header=10007_U_PPU Ungültiger Header (kein PPU am Anfang)
 unit_u_ppu_invalid_version=10008_U_PPU Ungültige Version $1
 % This unit file was compiled with a different version of the compiler, and
 % cannot be read.
-unit_u_ppu_invalid_processor=10009_U_PPU ist für einen anderen Prozessor kompiliert
+unit_u_ppu_invalid_processor=10009_U_PPU ist für einen anderen Prozessor übersetzt
 % This unit file was compiled for a different processor type, and
 % cannot be read
-unit_u_ppu_invalid_target=10010_U_PPU ist für ein anderes Zielsystem kompiliert
+unit_u_ppu_invalid_target=10010_U_PPU ist für ein anderes Zielsystem übersetzt
 % This unit file was compiled for a different processor type, and
 % cannot be read
 unit_u_ppu_source=10011_U_PPU Quelle: $1
@@ -2223,22 +2229,22 @@ unit_u_check_time=10037_U_PPU prüfe Datei $1 Zeit $2
 % When you use the \var{-vu} flag, the compiler show the filename and
 % date and time of the file which a recompile depends on
 ### The following two error msgs is currently disabled.
-#unit_h_cond_not_set_in_last_compile=10038_H_Conditional $1 wurde beim Start beim letzten Kompilieren von $2 nicht gesetzt
+#unit_h_cond_not_set_in_last_compile=10038_H_Conditional $1 wurde beim Start beim letzten Übersetzen von $2 nicht gesetzt
 #% when recompilation of an unit is required the compiler will check that
 #% the same conditionals are set for the recompiliation. The compiler has
 #% found a conditional that currently is defined, but was not used the last
 #% time the unit was compiled.
-#unit_h_cond_set_in_last_compile=10039_H_Conditional $1 wurde beim Start beim letzten Kompilieren von $2 gesetzt
+#unit_h_cond_set_in_last_compile=10039_H_Conditional $1 wurde beim Start beim letzten Übersetzen von $2 gesetzt
 #% when recompilation of an unit is required the compiler will check that
 #% the same conditionals are set for the recompiliation. The compiler has
 #% found a conditional that was used the last time the unit was compiled, but
 #% the conditional is currently not defined.
-unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht rekompilieren, aber geänderte Include-Datei gefunden
+unit_w_cant_compile_unit_with_changed_incfile=10040_W_Kann Unit $1 nicht erneut übersetzen, aber geänderte Include-Datei gefunden
 % A unit was found to have modified include files, but
 % some source files were not found, so recompilation is impossible.
 unit_u_source_modified=10041_U_Datei $1 ist neuer als die PPU Datei $2
 % A modified source file for a compiler unit was found.
-unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode kompiliert wurde
+unit_u_ppu_invalid_fpumode=10042_U_Versuch eine Unit zu verwenden, die in einem anderen FPU Mode übersetzt wurde
 % Trying to compile code while using units which were not compiled with
 % the same floating point format mode. Either all code should be compiled
 % with FPU emulation on, or with FPU emulation off.
@@ -2256,7 +2262,7 @@ unit_u_implementation_crc_changed=10046_U_Geänderte Implementation CRC für Uni
 % When you use the \var{-vu} flag, the compiler warns that it the
 % CRC calculated has been changed after the implementation
 % has been parsed.
-unit_u_finished_compiling=10047_U_Kompilieren der Unit $1 beendet
+unit_u_finished_compiling=10047_U_Übersetzen der Unit $1 beendet
 % When you use the \var{-vu} flag, the compiler warns that it
 % has finished compiling the unit.
 unit_u_add_depend_to=10048_U_Füge die Abhängigkeit von $1 von $2 dazu
@@ -2266,7 +2272,7 @@ unit_u_no_reload_is_caller=10049_U_Kein erneutes Laden, Unit $1 ist die Aufrufen
 % When you use the \var{-vu} flag, the compiler warns that it
 % has will not reload the unit because it is the unit that wants
 % to load this unit
-unit_u_no_reload_in_second_compile=10050_U_Kein erneutes Laden der Unit, bereits beim zweiten Kompilieren: $1
+unit_u_no_reload_in_second_compile=10050_U_Kein erneutes Laden der Unit, bereits beim zweiten Übersetzen: $1
 % When you use the \var{-vu} flag, the compiler warns that it
 % has will not reload the unit because it is already in a second recompile
 unit_u_flag_for_reload=10051_U_Flag für erneutes Laden: $1
@@ -2278,7 +2284,7 @@ unit_u_forced_reload=10052_U_Erzwungenes erneutes Laden
 unit_u_previous_state=10053_U_Vorhergehender Status von $1: $2
 % When you use the \var{-vu} flag, the compiler shows the
 % previous state of the unit
-unit_u_second_compile_unit=10054_U_$1 wird bereits kompiliert, zweites Kompilieren gesetzt
+unit_u_second_compile_unit=10054_U_$1 wird bereits übersetzt, zweites Übersetzen gesetzt
 % When you use the \var{-vu} flag, the compiler warns that it starts
 % recompiling a unit for the second time. This can happend with interdepend
 % units.
@@ -2354,7 +2360,7 @@ option_no_debug_support=11016_W_Erzeugung von Debug-Informationen wird von diese
 % It is possible to have a compiler executable that doesn't support
 % the generation of debugging info. If you use such an executable with the
 % \var{-g} switch, this warning will be displayed.
-option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu kompilieren
+option_no_debug_support_recompile_fpc=11017_H_Versuchen Sie mit -dGDB erneut zu übersetzen
 % It is possible to have a compiler executable that doesn't support
 % the generation of debugging info. If you use such an executable with the
 % \var{-g} switch, this warning will be displayed.
@@ -2459,151 +2465,155 @@ Fehlerberichte, Vorschläge usw. bitte senden an:
 #  The third character represents the indentation level.
 #
 option_help_pages=11025_[
-**0*_nach booleschen Optionen geben Sie + zum Ein- bzw. - zum Ausschalten an
-**1a_lösche die erzeugte Assembler-Datei nicht
-**2al_liste Quellcode-Zeilen in der Assembler-Datei
-**2an_liste "node info" in der Assembler-Datei
-*L2ap_benutze Pipes anstelle temporärer Assembler-Dateien
-**2ar_liste Registerbelegungsinformation in Assembler-Datei
-**2at_liste Temp. Variablenbelegungsinfo in Assembler-Datei
+**0*_Nach booleschen Optionen geben Sie + zum Ein- bzw. - zum Ausschalten an
+**1a_Lösche die erzeugte Assembler-Datei nicht
+**2al_Liste Quellcode-Zeilen in der Assembler-Datei
+**2an_Liste "node info" in der Assembler-Datei
+*L2ap_Benutze Pipes anstelle temporärer Assembler-Dateien
+**2ar_Liste Registerbelegungsinformation in Assembler-Datei
+**2at_Liste Temp. Variablenbelegungsinfo in Assembler-Datei
 **1A<x>_Ausgabe Format:
-**2Adefault_benutze den "default" Assembler
-3*2Aas_assembliere mit Hilfe von GNU AS
-3*2Anasmcoff_coff (Go32v2) Datei mit Hilfe von Nasm
-3*2Anasmelf_elf32 (Linux) Datei mit Hilfe von Nasm
+**2Adefault_Benutze den "default" Assembler
+3*2Aas_Assembliere mit Hilfe von GNU AS
+3*2Anasmcoff_COFF (Go32v2) Datei mit Hilfe von Nasm
+3*2Anasmelf_ELF32 (Linux) Datei mit Hilfe von Nasm
 3*2Anasmwin32_Win32 Object Datei mit Hilfe von Nasm
 3*2Anasmwdosx_Win32/WDOSX Object Datei mit Hilfe von Nasm
-3*2Awasm_obj Datei mit Hilfe von Wasm (Watcom)
-3*2Anasmobj_obj Datei mit Hilfe von Nasm
-3*2Amasm_obj Datei mit Hilfe von Masm (Microsoft)
-3*2Atasm_obj Datei mit Hilfe von Tasm (Borland)
-3*2Aelf_elf32 (Linux) mit Hilfe von internen Schreiber
-3*2Acoff_coff (Go32v2) mit Hilfe von internen Schreiber
-3*2Apecoff_pecoff (Win32) mit Hilfe von internen Schreiber
-4*2Aas_assembliere mit Hilfe von GNU AS
+3*2Awasm_Obj Datei mit Hilfe von Wasm (Watcom)
+3*2Anasmobj_Obj Datei mit Hilfe von Nasm
+3*2Amasm_Obj Datei mit Hilfe von Masm (Microsoft)
+3*2Atasm_Obj Datei mit Hilfe von Tasm (Borland)
+3*2Aelf_ELF32 (Linux) mit Hilfe von internen Schreiber
+3*2Acoff_COFF (Go32v2) mit Hilfe von internen Schreiber
+3*2Apecoff_PE_COFF (Win32) mit Hilfe von internen Schreiber
+4*2Aas_Assembliere mit Hilfe von GNU AS
 6*2Aas_Unix o-file mit Hilfe von GNU AS
 6*2Agas_GNU Motorola Assembler
 6*2Amit_MIT Syntax (old GAS)
 6*2Amot_Standard Motorola Assembler
-A*2Aas_assembliere mit Hilfe von GNU AS
-P*2Aas_assembliere mit Hilfe von GNU AS
-S*2Aas_assembliere mit Hilfe von GNU AS
-**1b_erzeuge Browser-Info
-**2bl_erzeuge Info zu lokalen Symbolen
-**1B_erzeuge alle Module (Build)
+A*2Aas_Assembliere mit Hilfe von GNU AS
+P*2Aas_Assembliere mit Hilfe von GNU AS
+S*2Aas_Assembliere mit Hilfe von GNU AS
+**1b_Erzeuge Browser-Info
+**2bl_Erzeuge Info zu lokalen Symbolen
+**1B_Erzeuge alle Module (Build)
 **1C<x>_Optionen für Code-Erzeugung:
 **2Cc<x>_Setze "default calling convention" zu <x>
-**2CD_erzeuge auch eine dynamische Bibliothek (nicht unterstützt)
-**2Ce_Kompiliere mit emulierten Fliesskomma opcodes
-**2Cf<x>_wähle den Fliesskomma instruction set aus, siehe fpc -i wegen möglicher Werte
-**2Cg_erzeuge PIC code
+**2CD_Erzeuge auch eine dynamische Bibliothek (nicht unterstützt)
+**2Ce_Übersetze mit emulierten Fliesskomma opcodes
+**2Cf<x>_Wähle den Fliesskomma instruction set aus, siehe fpc -i wegen möglicher Werte
+**2CF<x>_Minimale Präzission von Fliesskommakonstanten (default, 32, 64)
+**2Cg_Erzeuge PIC code
 **2Ch<n>_<n> Bytes Heap (zwischen 1023 und 67107840)
 **2Ci_I/O-Prüfung
-**2Cn_lasse die Linkstufe aus
-**2Co_prüfe Überlauf von Integer-Operationen
-**2Cp<x>_wähle instruction set aus, siehe fpc -i wegen möglicher Werte
+**2Cn_Lasse die Linkstufe aus
+**2Co_Prüfe Überlauf von Integer-Operationen
+**2Cp<x>_Wähle instruction set aus, siehe fpc -i wegen möglicher Werte
 **2CP<x>=<y>_ Einstellungen für packing
 **3CPPACKSET=<y>_ <y> Belegung von Sets: 0, 1 oder DEFAULT oder NORMAL, 2, 4 und 8
-**2Cr_führe Bereichsprüfung durch
-**2CR_verifiziere die Gültigkiet des Aufrufs der Objektmethoden
-**2Cs<n>_setze Grösse des Stacks auf <n>
-**2Ct_führe Stackprüfung durch
-**2Cx_benutze Smartlinking
-**1d<x>_definiere das Symbol <x>
-**1D_erzeuge eine DEF-Datei
-**2Dd<x>_setze Beschreibung zu <x>
-**2Dv<x>_setze DLL Version zu <x>
-*O2Dw_erzeuge PM-Anwendung
-**1e<x>_setze Pfad zur ausführbaren Datei
-**1E_genau wie -Cn
-**1fPIC_genau wie -Cg
+**2Cr_Führe Bereichsprüfung durch
+**2CR_Verifiziere die Gültigkiet des Aufrufs der Objektmethoden
+**2Cs<n>_Setze Grösse des Stacks auf <n>
+**2Ct_Führe Stackprüfung durch
+**2Cx_Benutze Smartlinking
+**1d<x>_Definiere das Symbol <x>
+**1D_Erzeuge eine DEF-Datei
+**2Dd<x>_Setze Beschreibung zu <x>
+**2Dv<x>_Setze DLL Version zu <x>
+*O2Dw_Erzeuge PM-Anwendung
+**1e<x>_Setze Pfad zur ausführbaren Datei
+**1E_Genau wie -Cn
+**1fPIC_Genau wie -Cg
 **1F<x>_Dateinamen und Pfade:
-**2Fa<x>[,y]_ein Program soll die Units <x> und [y] laden, bevor uses analysiert wird
-**2Fc<x>_setze die Eingabe-Codepage zu <x>
-**2FD<x>_setze das Verzeichnis für die Compiler-Hilfsprogramme
-**2Fe<x>_leite die Fehlerausgabe um nach <x>
-**2FE<x>_setze den Pfad für Exe/Unit-Dateien auf <x>
-**2Fi<x>_ergänze <x> zum Include-Pfad
-**2Fl<x>_ergänze <x> zum Bibliotheks-Pfad
-**2FL<x>_benutze <x> als dynamischen Linker
-**2Fm<x>_lade die Unicode-Konversionstabelle aus <x>.txt im Compiler-Verzeichnis
-**2Fo<x>_ergänze <x> zum Objektdatei-Pfad
-**2Fr<x>_lade die Fehler-Meldungs Datei <x>
-**2Fu<x>_ergänze <x> zum Unit-Pfad
-**2FU<x>_Units werden nach <x> ausgegen, hat Vorrang vor -FE
-*g1g<x>_erzeuge Informationen zur Fehlersuche:
+**2Fa<x>[,y]_Ein Program soll die Units <x> und [y] laden, bevor uses analysiert wird
+**2Fc<x>_Setze die Eingabe-Codepage zu <x>
+**2FC<x>_Setze den Namen des RC Compiler-Binärprograms auf <x>
+**2FD<x>_Setze das Verzeichnis für die Compiler-Hilfsprogramme
+**2Fe<x>_Leite die Fehlerausgabe um nach <x>
+**2Ff<x>_Ergänze <x> zum Framework-Pfad (nur Darwin)
+**2FE<x>_Setze den Pfad für Exe/Unit-Dateien auf <x>
+**2Fi<x>_Ergänze <x> zum Include-Pfad
+**2Fl<x>_Ergänze <x> zum Bibliotheks-Pfad
+**2FL<x>_Benutze <x> als dynamischen Linker
+**2Fm<x>_Lade die Unicode-Konversionstabelle aus <x>.txt im Compiler-Verzeichnis
+**2Fo<x>_Ergänze <x> zum Objektdatei-Pfad
+**2Fr<x>_Lade die Fehler-Meldungs Datei <x>
+**2FR<x>_Setze den Resource (.res) Linker auf <x>
+**2Fu<x>_Ergänze <x> zum Unit-Pfad
+**2FU<x>_Units werden nach <x> ausgegeben, hat Vorrang vor -FE
+*g1g<x>_Erzeuge Informationen zur Fehlersuche:
 *g2gc_Zeigerüberprüfung
-*g2gd_Verwende dbx
-*g2gg_Verwende gsym
 *g2gh_Heaptrace-Unit einbinden
-*g2gl_line info Unit einbinden, um mehr backtrace Informationen anzuzeigen
-*g2gp_erhalte Gross/Kleinschreibung in Stabs-Symbolnamen
-*g2gt_lösche lokale Variablen (um eine Verwendung ohne Initialisierung zu finden)
-*g2gv_erzeuge ein mit valgrind verfolgbares (traceable) Programm
-*g2gw_erzeuge dwarf Informationen
-**1i_zeige alle Information über den Compiler
-**2iD_zeige Compilerdatum
-**2iV_zeige Compilerversion
-**2iW_zeige vollständige Compilerversion
-**2iSO_zeige Compilerbetriebssystem
-**2iSP_zeige Compilerprozessor
-**2iTO_zeige Zielbetriebssystem
-**2iTP_zeige Zielprozessor
-**1I<x>_ergänze <x> zum Include-Pfad
-**1k<x>_übergebe <x> an den Linker
-**1l_zeige Logo
-**1M<x>_setze Sprachmodus zu <x>
+*g2gl_Line info Unit einbinden, um mehr backtrace Informationen anzuzeigen
+*g2go<x>_Setze Optionen für die Debug Informationen
+*g3godwarfsets_Schalte Dwarf Debug Informationen für Mengen (sets) ein (verhindert debugging mit gdb < 6.5)
+*g2gp_Erhalte Gross/Kleinschreibung in Stabs-Symbolnamen
+*g2gt_Lösche lokale Variablen (um eine Verwendung ohne Initialisierung zu finden)
+*g2gv_Erzeuge ein mit valgrind verfolgbares (traceable) Programm
+*g2gw_Erzeuge dwarf Informationen
+**1i_Zeige alle Information über den Compiler
+**2iD_Zeige Compilerdatum
+**2iV_Zeige Compilerversion
+**2iW_Zeige vollständige Compilerversion
+**2iSO_Zeige Compilerbetriebssystem
+**2iSP_Zeige Compilerprozessor
+**2iTO_Zeige Zielbetriebssystem
+**2iTP_Zeige Zielprozessor
+**1I<x>_Ergänze <x> zum Include-Pfad
+**1k<x>_Übergebe <x> an den Linker
+**1l_Zeige Logo
+**1M<x>_Setze Sprachmodus zu <x>
 **2Mfpc_Free Pascal Dialekt (Voreinstellung)
-**2Mobjfpc_schalte einige Delphi 2 Erweiterungen ein
-**2Mdelphi_versuche zu Delphi kompatibel zu sein
-**2Mtp_versuche zu TP/BP 7.0 kompatibel zu sein
-**2Mmacpas_versuche zu den MacIntosh Pascal-Dialekten kompatibel zu sein
+**2Mobjfpc_Schalte einige Delphi 2 Erweiterungen ein
+**2Mdelphi_Versuche zu Delphi kompatibel zu sein
+**2Mtp_Versuche zu TP/BP 7.0 kompatibel zu sein
+**2Mmacpas_Versuche zu den MacIntosh Pascal-Dialekten kompatibel zu sein
 **1n_Standard-Konfigurationsdatei ignorieren
-**1N<x>_node tree Optimierung
-**2Nu_unroll loops
-**1o<x>_die erzeugte, ausführbare Datei bekommt den Namen <x>
+**1N<x>_Node tree Optimierung
+**2Nu_Unroll loops
+**1o<x>_Die erzeugte, ausführbare Datei bekommt den Namen <x>
 **1O<x>_Optimierungen:
 **2O-_Optimierungen ausschalten
-**2O1_level 1 Optimierung (schnell und Debugger freundlich)
-**2O2_level 2 Optimierung (-O1 + schnelle Optimierungen)
-**2O3_level 3 Optimierung (-O2 + langsame Optimierungen)
+**2O1_Level 1 Optimierung (schnell und Debugger freundlich)
+**2O2_Level 2 Optimierung (-O1 + schnelle Optimierungen)
+**2O3_Level 3 Optimierung (-O2 + langsame Optimierungen)
 **2Oa<x>=<y>_Ausrichtung (alignment) von Mengen
 **2Oo[NO]<x>_Optimierungen ein- oder ausschalten, siehe fpc -i für mögliche Werte
-**2Op<x>_setze Zielprozessor für die Optimierung, siehe fpc -i für mögliche Werte
-**2Os_erzeuge kürzeren Code
-**1pg_erzeuge Profiler-Code für gprof
+**2Op<x>_Setze Zielprozessor für die Optimierung, siehe fpc -i für mögliche Werte
+**2Os_Erzeuge kürzeren Code
+**1pg_Erzeuge Profiler-Code für gprof
 **1R<x>_Assembler Code Format:
-**2Rdefault_benutze den default Assembler
-3*2Ratt_lese Assembler Code im AT&T Format
-3*2Rintel_lese Assembler im Intel Format
-6*2RMOT_lese Assembler im Motorola Format
+**2Rdefault_Benutze den default Assembler
+3*2Ratt_Lese Assembler Code im AT&T Format
+3*2Rintel_Lese Assembler im Intel Format
+6*2RMOT_Lese Assembler im Motorola Format
 **1S<x>_Syntax-Optionen:
-**2S2_schalte einige der Delphi 2 Erweiterungen ein (wie -Mobjfpc)
-**2Sc_unterstütze spezielle C Operatoren (*=,+=,/= and -=)
-**2Sa_erlaube assertion code.
-**2Sd_sei Delphi-kompatibel (wie -Mdelphi)
+**2S2_Schalte einige der Delphi 2 Erweiterungen ein (wie -Mobjfpc)
+**2Sc_Unterstütze spezielle C Operatoren (*=,+=,/= and -=)
+**2Sa_Erlaube assertion code.
+**2Sd_Sei Delphi-kompatibel (wie -Mdelphi)
 **2Se<x>_Fehler Optionen. <x> ist eine der folgenden Kombinationen:
 **3*_<n> : Compiler hält nach <n> Fehlern (Voreinstellung ist 1)
 **3*_w : Compiler hält auch nach Warnungen
 **3*_n : Compiler hält auch nach Anmerkungen
 **3*_h : Compiler hält auch nach Hinweisen
-**2Sg_erlaube LABEL und GOTO
-**2Sh_benutze ANSI-Strings
-**2Si_benutze C++ artige INLINE
-**2Sk_lade fpcylix Unit
-**2SI<x>_setze den Stil des Interface zu <x>
+**2Sg_Erlaube LABEL und GOTO
+**2Sh_Benutze ANSI-Strings
+**2Si_Benutze C++ artige INLINE
+**2Sk_Lade fpcylix Unit
+**2SI<x>_Setze den Stil des Interface zu <x>
 **3SIcom_COM kompatibles Interface (Voreinstellung)
 **3SIcorba_CORBA kompatibles Interface
-**2Sm_unterstütze Makros wie in C (global)
-**2So_sei TP/BP 7.0 kompatibel (wie -Mtp)
-**2Sp_sei gpc-kompatibel (wie -Mgpc)
-**2Ss_Kon-und Destruktorname müssen "Init" und "Done" sein
-**2St_erlaube Schlüsselwort static in Objekten
+**2Sm_Unterstütze Makros wie in C (global)
+**2So_Sei TP/BP 7.0 kompatibel (wie -Mtp)
+**2Sp_Sei gpc-kompatibel (wie -Mgpc)
+**2Ss_Konstruktor- und Destruktorname müssen "Init" und "Done" sein
+**2St_Erlaube Schlüsselwort static in Objekten
 **2Sx_Exception Schlüsselwörter einschalten (Voreinstellung in Delphi/ObjFPC Moden)
-**1s_rufe weder Assembler noch Linker auf (nur mit -a)
-**2sh_erzeuge Script um auf dem Host zu linken
-**2st_erzeuge Script um auf dem Zielsystem zu linken
-**2sr_überspringe die Phase der "register allocation" (mit -alr benutzen)
+**1s_Rufe weder Assembler noch Linker auf (nur mit -a)
+**2sh_Erzeuge Script um auf dem Host zu linken
+**2st_Erzeuge Script um auf dem Zielsystem zu linken
+**2sr_Überspringe die Phase der "register allocation" (mit -alr benutzen)
 **1T<x>_Zielbetriebssystem::
 3*2Temx_OS/2 via EMX (einschliesslich EMX/RSX extender)
 3*2Tfreebsd_FreeBSD
@@ -2633,51 +2643,54 @@ P*2Tlinux_Linux auf PowerPC
 P*2Tmacos_Mac OS (classic) auf PowerPC
 P*2Tmorphos_MorphOS
 S*2Tlinux_Linux
-**1u<x>_entferne die Definition für das Symbol <x>
+**1u<x>_Entferne die Definition für das Symbol <x>
 **1U<x>_Unit-Optionen:
-**2Un_prüfe den Unitnamen nicht
-**2Ur_erzeuge release unit Dateien
-**2Us_erzeuge eine Systemunit
+**2Un_Prüfe den Unitnamen nicht
+**2Ur_Erzeuge release unit Dateien
+**2Us_Erzeuge eine Systemunit
 **1v<x>_Meldungen, <x> ist eine Kombination der folgenden Zeichen:
-**2*_e : Fehler (Standard)             0 : nichts (ausser Fehlern)
-**2*_w : Warnungen                     u : Unit Info
-**2*_n : Anmerkungen                   t : angesprochene/benutzte Dateien
-**2*_h : Hinweise                      c : Preprozessordirective
-**2*_i : allgemeine Info               d : Debug Info
+**2*_e : Fehler (Standard)             0 : Nichts (ausser Fehlern)
+**2*_w : Warnungen                     u : Unit Informationen
+**2*_n : Anmerkungen                   t : Angesprochene/benutzte Dateien
+**2*_h : Hinweise                      c : Preprozessordirektive
+**2*_i : Allgemeine Informationen      d : Debug Informationen
 **2*_l : Zeilennummern                 r : Rhide/GCC kompatibler Modus
-**2*_a : alles                         x : Exe-Datei Info (nur Win32)
-**2*_b : schreibe bei Meldungen mit Dateinamen den vollständigem Pfad
-**2*_v : schreibe fpcdebug.txt mit     p : schreibe tree.log mit Analysenbaum (parse tree)
-**2*_   ganz viel Informationen
+**2*_a : Alles                         x : Exe-Datei Informationen (nur Win32)
+**2*_b : Schreibe bei Meldungen mit Dateinamen den vollständigem Pfad
+**2*_v : Schreibe fpcdebug.txt mit     p : Schreibe tree.log mit Analysenbaum (parse tree)
+**2*_   ganz viel Information
 3*1W<x>_Win32-ähnliche Ziel-Optionen
-3*2WB_erzeuge ein relozierbares Image
-3*2WB<x>_Setze Image base auf den Hexadecimal Wert <x>
-3*2WC_spezifiziere "console type application"
-3*2WD_benutze DEFFILE um Funtionen der DLL oder EXE zu exportieren
-3*2WF_spezifiziere "full-screen type application" (nur OS/2)
-3*2WG_spezifiziere "graphic type application"
-3*2WN_erzeuge keinen "relocation code" (notwendig für debugging)
-3*2WR_erzeuge "relocation code"
-P*2WC_spezifiziere "console type application" (nur Mac OS)
-P*2WG_spezifiziere "graphic type application" (nur Mac OS)
-P*2WT_spezifiziere "tool type application"    (MPW tool, nur Mac OS)
+3*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+P*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+p*2Wb_Erzeuge statt einer Bibliothek ein Bundle (Darwin)
+3*2WB_Erzeuge ein relozierbares Image
+3*2WB<x>_Setze die Image base auf den Hexadecimal Wert <x>
+3*2WC_Spezifiziere "console type application"
+3*2WD_Benutze DEFFILE um Funktionen der DLL oder EXE zu exportieren
+3*2WF_Spezifiziere "full-screen type application" (nur OS/2)
+3*2WG_Spezifiziere "graphic type application"
+3*2WN_Erzeuge keinen "relocation code" (notwendig für debugging)
+3*2WR_Erzeuge "relocation code"
+P*2WC_Spezifiziere "console type application" (nur Mac OS)
+P*2WG_Spezifiziere "graphic type application" (nur Mac OS)
+P*2WT_Spezifiziere "tool type application"    (MPW tool, nur Mac OS)
 **1X_Programm-Optionen:
-**2Xc_übergebe --shared an den Linker (nur Unix)
-**2Xd_den Standard Bibliotheks-Suchphad NICHT nutzen (benötigt für cross compile)
-**2Xe_verwende den externen Linker
-**2XD_versuche Units dynamisch zu linken             (definiert FPC_LINK_DYNAMIC)
-**2Xi_verwende den internen Linker
-**2Xm_erzeuge die "link map"
-**2XM<x>_setze den Namen der 'main' program Routine   (default ist 'main')
-**2XP<x>_stelle den Namen der Compiler-Hilfsprogrammen den Prefix <x> voran
-**2Xr<x>_setze den Bibliotheks-Suchpfad zu <x>       (benötigt für cross compile)
-**2Xs_entferne alle Symbole von ausführbarer Datei
-**2XS_versuche Units statisch zu linken (default)    (definiert FPC_LINK_STATIC)
-**2Xt_linke mit statischen Bibliotheken              (-static wird an den Linker übergeben)
-**2XX_versuche Units smart zu linken                 (definiert FPC_LINK_SMART)
+**2Xc_Übergebe --shared an den Linker (nur Unix)
+**2Xd_Den Standard Bibliotheks-Suchpfad NICHT nutzen (benötigt für cross compile)
+**2Xe_Verwende den externen Linker
+**2XD_Versuche Units dynamisch zu linken             (definiert FPC_LINK_DYNAMIC)
+**2Xi_Verwende den internen Linker
+**2Xm_Erzeuge die "link map"
+**2XM<x>_Setze den Namen der 'main' program Routine   (default ist 'main')
+**2XP<x>_Stelle den Namen der Compiler-Hilfsprogrammen den Prefix <x> voran
+**2Xr<x>_Setze den Bibliotheks-Suchpfad zu <x>       (benötigt für cross compile)
+**2Xs_Entferne alle Symbole von ausführbarer Datei
+**2XS_Versuche Units statisch zu linken (default)    (definiert FPC_LINK_STATIC)
+**2Xt_Linke mit statischen Bibliotheken              (-static wird an den Linker übergeben)
+**2XX_Versuche Units smart zu linken                 (definiert FPC_LINK_SMART)
 **1*_
-**1?_zeigt diese Hilfe an
-**1h_zeigt diese Hilfe ohne Warten an
+**1?_Zeigt diese Hilfe an
+**1h_Zeigt diese Hilfe ohne Warten an
 ]
 
 #

+ 186 - 169
compiler/msg/errore.msg

@@ -18,7 +18,6 @@
 # <part> is the part of the compiler the message is used
 #   asmr_     assembler parsing
 #   asmw_     assembler writing/binary writers
-
 #   unit_     unit handling
 #   scan_     scanner
 #   parser_   parser
@@ -125,7 +124,7 @@ general_i_number_of_notes=01023_I_$1 note(s) issued
 #
 # Scanner
 #
-# 02063 is the last used one
+# 02084 is the last used one
 #
 % \section{Scanner messages.}
 % This section lists the messages that the scanner emits. The scanner takes
@@ -345,11 +344,15 @@ scanner_e_illegal_warn_state=02079_E_Illegal state for $WARN directive
 % Only ON and OFF can be used as state with a \$warn compiler directive
 scan_e_only_packset=02080_E_Illegal set packing value
 % Only 0, 1, 2, 4, 8, DEFAULT and NORMAL are allowed as packset parameter
-scan_w_pic_ignored=02081_W_PIC directive ignored
-% Several targets like windows do not support the PIC directive and need it to be
+scan_w_pic_ignored=02081_W_PIC directive or switch ignored
+% Several targets like windows do not support neither need PIC so the PIC directive and switch are
 % ignored.
 scan_w_unsupported_switch_by_target=02082_W_The switch "$1" is not supported by the currently selected target
-% Some compiler switches like $E are not supported by all targets.
+% Some compiler switches like \$E are not supported by all targets.
+scan_w_frameworks_darwin_only=02084_W_Framework-related options are only supported for Darwin/Mac OS X
+% Frameworks are not a known concept, or at least not supported by FPC, on operating systems other than Darwin/Mac OS X.
+scan_e_illegal_minfpconstprec=02085_E_Illegal minimal floating point constant precision "$1"
+% Valid minimal precisions for floating point constants are default, 32 and 64, which mean respectively minimal (usually 32 bit), 32 bit and 64 bit precision.
 % \end{description}
 #
 # Parser
@@ -426,7 +429,7 @@ parser_e_overloaded_have_same_parameters=03028_E_overloaded functions have the s
 % You're declaring overloaded functions, but with the same parameter list.
 % Overloaded function must have at least 1 different parameter in their
 % declaration.
-parser_e_header_dont_match_forward=03029_E_function header doesn't match the forward declaration "$1"
+parser_e_header_dont_match_forward=03029_E_function header doesn't match the previous declaration "$1"
 % You declared a function with same parameters but
 % different result type or function modifiers.
 parser_e_header_different_var_names=03030_E_function header "$1" doesn't match forward : var name changes $2 => $3
@@ -634,7 +637,7 @@ parser_e_no_new_or_dispose_for_classes=03086_E_The extended syntax of new or dis
 parser_e_procedure_overloading_is_off=03088_E_Procedure overloading is switched off
 % When using the \var{-So} switch, procedure overloading is switched off.
 % Turbo Pascal does not support function overloading.
-parser_e_overload_operator_failed=03089_E_It is not possible to overload this operator (overload = instead)
+parser_e_overload_operator_failed=03089_E_It is not possible to overload this operator. Related overloadable operators (if any) are: $1
 % You are trying to overload an operator which cannot be overloaded.
 % The following operators can be overloaded :
 % \begin{verbatim}
@@ -1416,9 +1419,9 @@ type_h_convert_mul_operands_to_prevent_overflow=04081_H_Converting the operands
 % Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
 % could prevent such errors by converting the operands to this type before doing the multiplication.
 type_w_pointer_to_signed=04082_W_Converting pointers to signed integers may result in wrong comparison results and range errors, use an unsigned type instead.
-% The virtual address space on 32-bit machines runs from $00000000 to $ffffffff. Many operating systems allow you to
-% allocate memory above $80000000, for example both Windows and Linux allow pointers in the range $0000000 to $bfffffff.
-% If you convert pointers to signed types, this can cause overflow and range check errors, but also $80000000 < $7fffffff.
+% The virtual address space on 32-bit machines runs from \$00000000 to \$ffffffff. Many operating systems allow you to
+% allocate memory above \$80000000, for example both Windows and Linux allow pointers in the range \$0000000 to \$bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors, but also \$80000000 < \$7fffffff.
 % This can cause random errors in code like "if p>q".
 % \end{description}
 #
@@ -2457,148 +2460,152 @@ Report bugs,suggestions etc to:
 #  The third character represents the indentation level.
 #
 option_help_pages=11025_[
-**0*_put + after a boolean switch option to enable it, - to disable it
-**1a_the compiler doesn't delete the generated assembler file
-**2al_list sourcecode lines in assembler file
-**2an_list node info in assembler file
-*L2ap_use pipes instead of creating temporary assembler files
-**2ar_list register allocation/release info in assembler file
-**2at_list temp allocation/release info in assembler file
-**1A<x>_output format:
-**2Adefault_use default assembler
-3*2Aas_assemble using GNU AS
-3*2Anasmcoff_coff (Go32v2) file using Nasm
-3*2Anasmelf_elf32 (Linux) file using Nasm
+**0*_Put + after a boolean switch option to enable it, - to disable it
+**1a_The compiler doesn't delete the generated assembler file
+**2al_List sourcecode lines in assembler file
+**2an_List node info in assembler file
+*L2ap_Use pipes instead of creating temporary assembler files
+**2ar_List register allocation/release info in assembler file
+**2at_List temp allocation/release info in assembler file
+**1A<x>_Output format:
+**2Adefault_Use default assembler
+3*2Aas_Assemble using GNU AS
+3*2Anasmcoff_COFF (Go32v2) file using Nasm
+3*2Anasmelf_ELF32 (Linux) file using Nasm
 3*2Anasmwin32_Win32 object file using Nasm
 3*2Anasmwdosx_Win32/WDOSX object file using Nasm
-3*2Awasm_obj file using Wasm (Watcom)
-3*2Anasmobj_obj file using Nasm
-3*2Amasm_obj file using Masm (Microsoft)
-3*2Atasm_obj file using Tasm (Borland)
-3*2Aelf_elf32 (Linux) using internal writer
-3*2Acoff_coff (Go32v2) using internal writer
-3*2Apecoff_pecoff (Win32) using internal writer
-4*2Aas_assemble using GNU AS
+3*2Awasm_Obj file using Wasm (Watcom)
+3*2Anasmobj_Obj file using Nasm
+3*2Amasm_Obj file using Masm (Microsoft)
+3*2Atasm_Obj file using Tasm (Borland)
+3*2Aelf_ELF (Linux) using internal writer
+3*2Acoff_COFF (Go32v2) using internal writer
+3*2Apecoff_PE-COFF (Win32) using internal writer
+4*2Aas_Assemble using GNU AS
 6*2Aas_Unix o-file using GNU AS
 6*2Agas_GNU Motorola assembler
 6*2Amit_MIT Syntax (old GAS)
 6*2Amot_Standard Motorola assembler
-A*2Aas_assemble using GNU AS
-P*2Aas_assemble using GNU AS
-S*2Aas_assemble using GNU AS
-**1b_generate browser info
-**2bl_generate local symbol info
-**1B_build all modules
-**1C<x>_code generation options:
-**2Cc<x>_set default calling convention to <x>
-**2CD_create also dynamic library (not supported)
+A*2Aas_Assemble using GNU AS
+P*2Aas_Assemble using GNU AS
+S*2Aas_Assemble using GNU AS
+**1b_Generate browser info
+**2bl_Generate local symbol info
+**1B_Build all modules
+**1C<x>_Code generation options:
+**2Cc<x>_Set default calling convention to <x>
+**2CD_Create also dynamic library (not supported)
 **2Ce_Compilation with emulated floating point opcodes
 **2Cf<x>_Select fpu instruction set to use, see fpc -i for possible values
+**2CF<x>_Minimal floating point constant precision (default, 32, 64)
 **2Cg_Generate PIC code
 **2Ch<n>_<n> bytes heap (between 1023 and 67107840)
 **2Ci_IO-checking
-**2Cn_omit linking stage
-**2Co_check overflow of integer operations
-**2Cp<x>_select instruction set, see fpc -i for possible values
+**2Cn_Omit linking stage
+**2Co_Check overflow of integer operations
+**2Cp<x>_Select instruction set, see fpc -i for possible values
 **2CP<x>=<y>_ packing settings
 **3CPPACKSET=<y>_ <y> set allocation: 0, 1 or DEFAULT or NORMAL, 2, 4 and 8
-**2Cr_range checking
-**2CR_verify object method call validity
-**2Cs<n>_set stack size to <n>
-**2Ct_stack checking
-**2CX_create also smartlinked library
-**1d<x>_defines the symbol <x>
-**1D_generate a DEF file
-**2Dd<x>_set description to <x>
-**2Dv<x>_set DLL version to <x>
+**2Cr_Range checking
+**2CR_Verify object method call validity
+**2Cs<n>_Set stack size to <n>
+**2Ct_Stack checking
+**2CX_Create also smartlinked library
+**1d<x>_Defines the symbol <x>
+**1D_Generate a DEF file
+**2Dd<x>_Set description to <x>
+**2Dv<x>_Set DLL version to <x>
 *O2Dw_PM application
-**1e<x>_set path to executable
-**1E_same as -Cn
-**1fPIC_same as -Cg
-**1F<x>_set file names and paths:
-**2Fa<x>[,y]_for a program load first units <x> and [y] before uses is parsed
-**2Fc<x>_sets input codepage to <x>
-**2FD<x>_sets the directory where to search for compiler utilities
-**2Fe<x>_redirect error output to <x>
-**2FE<x>_set exe/unit output path to <x>
-**2Fi<x>_adds <x> to include path
-**2Fl<x>_adds <x> to library path
-**2FL<x>_uses <x> as dynamic linker
-**2Fm<x>_load unicode conversion table from <x>.txt in the compiler dir
-**2Fo<x>_adds <x> to object path
-**2Fr<x>_load error message file <x>
-**2Fu<x>_adds <x> to unit path
-**2FU<x>_set unit output path to <x>, overrides -FE
-*g1g_generate debugger information:
-*g2gc_generate checks for pointers
-*g2gd_use dbx
-*g2gg_use gsym
-*g2gh_use heap trace unit (for memory leak debugging)
-*g2gl_use line info unit to show more info for backtraces
-*g2gp_preserve case in stabs symbol names
-*g2gt_trash local variables (to detect uninitialized uses)
-*g2gv_generates programs traceable with valgrind
-*g2gw_generate dwarf debugging info
-**1i_information
-**2iD_return compiler date
-**2iV_return compiler version
-**2iW_return full compiler version
-**2iSO_return compiler OS
-**2iSP_return compiler processor
-**2iTO_return target OS
-**2iTP_return target processor
-**1I<x>_adds <x> to include path
+**1e<x>_Set path to executable
+**1E_Same as -Cn
+**1fPIC_Same as -Cg
+**1F<x>_Set file names and paths:
+**2Fa<x>[,y]_(for a program) load units <x> and [y] before uses is parsed
+**2Fc<x>_Set input codepage to <x>
+**2FC<x>_Set RC compiler binary name to <x>
+**2FD<x>_Set the directory where to search for compiler utilities
+**2Fe<x>_Redirect error output to <x>
+**2Ff<x>_Add <x> to framework path (Darwin only)
+**2FE<x>_Set exe/unit output path to <x>
+**2Fi<x>_Add <x> to include path
+**2Fl<x>_Add <x> to library path
+**2FL<x>_Use <x> as dynamic linker
+**2Fm<x>_Load unicode conversion table from <x>.txt in the compiler dir
+**2Fo<x>_Add <x> to object path
+**2Fr<x>_Load error message file <x>
+**2FR<x>_Set resource (.res) linker to <x>
+**2Fu<x>_Add <x> to unit path
+**2FU<x>_Set unit output path to <x>, overrides -FE
+*g1g_Generate debug information (default format for target)
+*g2gc_Generate checks for pointers
+*g2gh_Use heaptrace unit (for memory leak/corruption debugging)
+*g2gl_Use line info unit (show more info with backtraces)
+*g2gp_Preserve case in stabs symbol names
+*g2gs_Generate stabs debug information
+*g2gt_Trash local variables (to detect uninitialized uses)
+*g2gv_Generates programs traceable with valgrind
+*g2gw_Generate dwarf-2 debug information (same as -gw2)
+*g2gw2_Generate dwarf-2 debug information
+*g2gw3_Generate dwarf-3 debug information
+**1i_Information
+**2iD_Return compiler date
+**2iV_Return short compiler version
+**2iW_Return full compiler version
+**2iSO_Return compiler OS
+**2iSP_Return compiler host processor
+**2iTO_Return target OS
+**2iTP_Return target processor
+**1I<x>_Add <x> to include path
 **1k<x>_Pass <x> to the linker
-**1l_write logo
-**1M<x>_set language mode to <x>
-**2Mfpc_free pascal dialect (default)
-**2Mobjfpc_switch some Delphi 2 extensions on
-**2Mdelphi_tries to be Delphi compatible
-**2Mtp_tries to be TP/BP 7.0 compatible
-**2Mmacpas_tries to be compatible to the macintosh pascal dialects
-**1n_don't read the default config file
-**1N<x>_node tree optimizations
-**2Nu_unroll loops
-**1o<x>_change the name of the executable produced to <x>
-**1O<x>_optimizations:
-**2O-_disable optimizations
-**2O1_level 1 optimizations (quick and debugger friendly)
-**2O2_level 2 optimizations (-O1 + quick optimizations)
-**2O3_level 3 optimizations (-O2 + slow optimizations)
-**2Oa<x>=<y>_set alignment
-**2Oo[NO]<x>_enable or disable optimizations, see fpc -i for possible values
-**2Op<x>_set target cpu for optimizing, see fpc -i for possible values
-**2Os_generate smaller code
-**1pg_generate profile code for gprof (defines FPC_PROFILE)
-**1R<x>_assembler reading style:
-**2Rdefault_use default assembler
-3*2Ratt_read AT&T style assembler
-3*2Rintel_read Intel style assembler
-6*2RMOT_read motorola style assembler
-**1S<x>_syntax options:
-**2S2_same as -Mobjfpc
-**2Sc_supports operators like C (*=,+=,/= and -=)
-**2Sa_include assertion code.
-**2Sd_same as -Mdelphi
-**2Se<x>_error options. <x> is a combination of the following:
-**3*_<n> : compiler stops after the <n> errors (default is 1)
-**3*_w : compiler stops also after warnings
-**3*_n : compiler stops also after notes
-**3*_h : compiler stops also after hints
-**2Sg_allow LABEL and GOTO
-**2Sh_Use ansistrings
-**2Si_support C++ styled INLINE
-**2Sk_load fpcylix unit
-**2SI<x>_set interface style to <x>
+**1l_Write logo
+**1M<x>_Set language mode to <x>
+**2Mfpc_Free Pascal dialect (default)
+**2Mobjfpc_FPC mode with Object Pascal support
+**2Mdelphi_Delphi 7 compatibility mode
+**2Mtp_TP/BP 7.0 compatibility mode
+**2Mmacpas_Macintosh Pascal dialects compatibility mode
+**1n_Do not read the default config files
+**1N<x>_Node tree optimizations
+**2Nu_Unroll loops
+**1o<x>_Change the name of the executable produced to <x>
+**1O<x>_Optimizations:
+**2O-_Disable optimizations
+**2O1_Level 1 optimizations (quick and debugger friendly)
+**2O2_Level 2 optimizations (-O1 + quick optimizations)
+**2O3_Level 3 optimizations (-O2 + slow optimizations)
+**2Oa<x>=<y>_Set alignment
+**2Oo[NO]<x>_Enable or disable optimizations, see fpc -i for possible values
+**2Op<x>_Set target cpu for optimizing, see fpc -i for possible values
+**2Os_Optimize for size rather than speed
+**1pg_Generate profile code for gprof (defines FPC_PROFILE)
+**1R<x>_Assembler reading style:
+**2Rdefault_Use default assembler for target
+3*2Ratt_Read AT&T style assembler
+3*2Rintel_Read Intel style assembler
+6*2RMOT_Read motorola style assembler
+**1S<x>_Syntax options:
+**2S2_Same as -Mobjfpc
+**2Sc_Support operators like C (*=,+=,/= and -=)
+**2Sa_Turn on assertions
+**2Sd_Same as -Mdelphi
+**2Se<x>_Error options. <x> is a combination of the following:
+**3*_<n> : Compiler halts after the <n> errors (default is 1)
+**3*_w : Compiler also halts after warnings
+**3*_n : Compiler also halts after notes
+**3*_h : Compiler also halts after hints
+**2Sg_Enable LABEL and GOTO (default in -Mtp and -Mdelphi)
+**2Sh_Use ansistrings by default instead of shortstrings
+**2Si_Turn on inlining of procedures/functions declared as "inline"
+**2Sk_Load fpcylix unit
+**2SI<x>_Set interface style to <x>
 **3SIcom_COM compatible interface (default)
 **3SIcorba_CORBA compatible interface
-**2Sm_support macros like C (global)
-**2So_same as -Mtp
-**2Sp_same as -Mgpc
-**2Ss_constructor name must be init (destructor must be done)
-**2St_allow static keyword in objects
-**2Sx_enable exception keywords (default in Delphi/ObjFPC modes)
-**1s_don't call assembler and linker
+**2Sm_Support macros like C (global)
+**2So_Same as -Mtp
+**2Ss_Constructor name must be init (destructor must be done)
+**2St_Allow static keyword in objects
+**2Sx_Enable exception keywords (default in Delphi/ObjFPC modes)
+**1s_Do not call assembler and linker
 **2sh_Generate script to link on host
 **2st_Generate script to link on target
 **2sr_Skip register allocation phase (use with -alr)
@@ -2631,11 +2638,11 @@ P*2Tlinux_Linux on PowerPC
 P*2Tmacos_Mac OS (classic) on PowerPC
 P*2Tmorphos_MorphOS
 S*2Tlinux_Linux
-**1u<x>_undefines the symbol <x>
-**1U_unit options:
-**2Un_don't check the unit name
-**2Ur_generate release unit files
-**2Us_compile a system unit
+**1u<x>_Undefines the symbol <x>
+**1U_Unit options:
+**2Un_Do not check where the unit name matches the file name
+**2Ur_Generate release unit files (never automatically recompiled)
+**2Us_Compile a system unit
 **1v<x>_Be verbose. <x> is a combination of the following letters:
 **2*_e : Show errors (default)       0 : Show nothing (except errors)
 **2*_w : Show warnings               u : Show unit info
@@ -2645,37 +2652,47 @@ S*2Tlinux_Linux
 **2*_l : Show linenumbers            r : Rhide/GCC compatibility mode
 **2*_a : Show everything             x : Executable info (Win32 only)
 **2*_b : Write file names messages with full path
-**2*_v : write fpcdebug.txt with     p : Write tree.log with parse tree
+**2*_v : Write fpcdebug.txt with     p : Write tree.log with parse tree
 **2*_    lots of debugging info
-3*1W<x>_Win32-like target options
-3*2WB_Create a relocatable image
-3*2WB<x>_Set Image base to Hexadecimal <x> value
-3*2WC_Specify console type application
-3*2WD_Use DEFFILE to export functions of DLL or EXE
-3*2WF_Specify full-screen type application (OS/2 only)
-3*2WG_Specify graphic type application
-3*2WN_Do not generate relocation code (necessary for debugging)
-3*2WR_Generate relocation code
-P*2WC_Specify console type application (Mac OS only)
-P*2WG_Specify graphic type application (Mac OS only)
-P*2WT_Specify tool type application (MPW tool, Mac OS only)
-**1X_executable options:
-**2Xc_pass --shared to the linker (Unix only)
-**2Xd_don't use standard library search path (needed for cross compile)
-**2Xe_use external linker
-**2XD_try to link units dynamic          (defines FPC_LINK_DYNAMIC)
-**2Xi_use internal linker
-**2Xm_generate link map
-**2XM<x>_set the name of the 'main' program routine (default is 'main')
-**2XP<x>_prepend the binutils names with the prefix <x>
-**2Xr<x>_set library search path to <x> (needed for cross compile)
-**2Xs_strip all symbols from executable
-**2XS_try to link units static (default) (defines FPC_LINK_STATIC)
-**2Xt_link with static libraries (-static is passed to linker)
-**2XX_try to link units smart            (defines FPC_LINK_SMART)
+3*1W<x>_Target-specific options (targets)
+A*1W<x>_Target-specific options (targets)
+P*1W<x>_Target-specific options (targets)
+3*2Wb_Create a bundle instead of a library (Darwin)
+P*2Wb_Create a bundle instead of a library (Darwin)
+p*2Wb_Create a bundle instead of a library (Darwin)
+3*2WB_Create a relocatable image (Windows)
+A*2WB_Create a relocatable image (Windows, Symbian)
+3*2WC_Specify console type application (EMX, OS/2, Windows)
+A*2WC_Specify console type application (Windows)
+P*2WC_Specify console type application (Classic Mac OS)
+3*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
+A*2WD_Use DEFFILE to export functions of DLL or EXE (Windows)
+3*2WF_Specify full-screen type application (EMX, OS/2)
+3*2WG_Specify graphic type application (EMX, OS/2, Windows)
+A*2WG_Specify graphic type application (Windows)
+P*2WG_Specify graphic type application (Classic Mac OS)
+3*2WN_Do not generate relocation code, needed for debugging (Windows)
+A*2WN_Do not generate relocation code, needed for debugging (Windows)
+3*2WR_Generate relocation code (Windows)
+A*2WR_Generate relocation code (Windows)
+P*2WT_Specify MPW tool type application (Classic Mac OS)
+**1X_Executable options:
+**2Xc_Pass --shared/-dynamic to the linker (BeOS, Darwin, FreeBSD, Linux)
+**2Xd_Do not use standard library search path (needed for cross compile)
+**2Xe_Use external linker
+**2XD_Try to link units dynamically      (defines FPC_LINK_DYNAMIC)
+**2Xi_Use internal linker
+**2Xm_Generate link map
+**2XM<x>_Set the name of the 'main' program routine (default is 'main')
+**2XP<x>_Prepend the binutils names with the prefix <x>
+**2Xr<x>_Set library search path to <x> (needed for cross compile)
+**2Xs_Strip all symbols from executable
+**2XS_Try to link units statically (default, defines FPC_LINK_STATIC)
+**2Xt_Link with static libraries (-static is passed to linker)
+**2XX_Try to smartlink units             (defines FPC_LINK_SMART)
 **1*_
-**1?_shows this help
-**1h_shows this help without waiting
+**1?_Show this help
+**1h_Shows this help without waiting
 ]
 
 #

+ 25 - 4
compiler/msg/errorhe.msg

@@ -4,7 +4,7 @@
 #
 #   Hebrew (CP1255) language file for Free Pascal Compiler
 #   Contributed by Ido Kanner <idokan at gmail.com> and Dotan Kamber <kamberd at yahoo.com>
-#   Based on errore.msg of SVN revision 7423
+#   Based on errore.msg of SVN revision 8090
 #
 #   See the file COPYING.FPC, included in this distribution,
 #   for details about the copyright.
@@ -350,6 +350,8 @@ scan_e_only_packset=02080_E_
 scan_w_pic_ignored=02081_W_îúòìí îäåøàú PIC
 % Several targets like windows do not support the PIC directive and need it to be
 % ignored.
+scan_w_unsupported_switch_by_target=02082_W_äîúâ "$1" àéðå ðúîê áñåâ úåöàä ùðáçø
+% Some compiler switches like $E are not supported by all targets.
 % \end{description}
 #
 # Parser
@@ -850,7 +852,7 @@ parser_e_ill_property_storage_sym=03155_E_
 % You can't use this type of symbol as storage specifier in property
 % declaration. You can use only methods with the result type boolean,
 % boolean class fields or boolean constants
-parser_e_only_publishable_classes_can__be_published=03156_E_ø÷ îçì÷ä äîäåãøú áîöá $M+ éëåìä ìäéåú àéæåø ä published
+parser_e_only_publishable_classes_can_be_published=03156_E_ø÷ îçì÷ä äîäåãøú áîöá $M+ éëåìä ìäéåú àéæåø ä published
 % In the published section of a class can be only class as fields used which
 % are compiled in \var{\{\$M+\}} or which are derived from such a class. Normally
 % such a class should be derived from TPersitent
@@ -1133,6 +1135,12 @@ parser_e_initialized_not_for_external=03233_E_
 % Variables declared as external can not be initialized with a default value.
 parser_e_illegal_function_result=03234_E_èéôåñ äçæøä ùì äôåð÷öéä àéðå çå÷é
 % Some types like file types can not be used as function result
+parser_e_no_common_type=03235_E_àéï èéôåñ îùåúó ì "$1" å "$2"
+% To perform an operation beween integers, the compiler converts both operands
+% to their common type, which appears to be an invalid type. To determine the
+% common type of the operands, the compiler takes the minimum of the minimal values
+% of both types, and the maximum of the maximal values of both types. The common
+% type is then minimum..maximum.
 % \end{description}
 #
 # Type Checking
@@ -1398,6 +1406,20 @@ type_e_cant_export_local=04077_E_
 type_e_not_automatable=04078_E_äèéôåñ àéðå àåèåîè: "$1"
 % Only byte, integer, longint, smallint, currency, single, double, ansistring,
 % widestring, tdatetime, variant, olevariant, wordbool and all interfaces are automatable.
+type_h_convert_add_operands_to_prevent_overflow=04079_H_äîøú äàåôøðã ì"$1" ìôðé ôòåìú äçéáåø, éëåì ìîðåò ùâéàåú âìéùä.
+% Adding two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the addition.
+type_h_convert_sub_operands_to_prevent_overflow=04080_H_äîøú äàåôøðã ì"$1" ìôðé ôòåìú äçéáåø éëåìä ìîðåò ùâéàåú âìéùä.
+% Subtracting two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the subtraction.
+type_h_convert_mul_operands_to_prevent_overflow=04081_H_äîøú äàåôøðã "$1" ìôðé ôòåìú äëôì éëåìä ìîðåò ùâéàåú âìéùä.
+% Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the multiplication.
+type_w_pointer_to_signed=04082_W_äîøú îöáéòéí ìîñôøéí ùìîéí òí ñéîï òìåìä ìâøåí ìùâéàåú áúåöàåú äùååàä åáèååçéí. éù ìäùúîù áî÷åí æàú áèéôåñ ììà ñéîï.
+% The virtual address space on 32-bit machines runs from $00000000 to $ffffffff. Many operating systems allow you to
+% allocate memory above $80000000, for example both Windows and Linux allow pointers in the range $0000000 to $bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors, but also $80000000 < $7fffffff.
+% This can cause random errors in code like "if p>q".
 % \end{description}
 #
 # Symtable
@@ -2214,7 +2236,7 @@ unit_w_cant_compile_unit_with_changed_incfile=10040_W_
 % some source files were not found, so recompilation is impossible.
 unit_u_source_modified=10041_U_ä÷åáõ $1 çãù éåúø îä÷åáõ PPU $2
 % A modified source file for a compiler unit was found.
-unit_u_ppu_invalid_fpumode=10042_U_îùúîù áéçéãä àùø ìà äåãøä áöåøä ðëåðä áîöá FPU
+unit_u_ppu_invalid_fpumode=10042_U_îðñä ìäùúîù áéçéãä àùø äåãøä ìîöá FPU ùåðä
 % Trying to compile code while using units which were not compiled with
 % the same floating point format mode. Either all code should be compiled
 % with FPU emulation on, or with FPU emulation off.
@@ -2533,7 +2555,6 @@ S*2Aas_
 **2Mobjfpc_àôùø ëîä úåñôåú ùì Delphi 2
 **2Mdelphi_îðñä ìäéåú úåàí Delphi
 **2Mtp_îðñä ìäéåú úåàí ì TP/BP 7.0
-**2Mgpc_îðñä ìäéåú úåàí gpc
 **2Mmacpas_îðñä ìäéåú úåàí ììäâ ùì Macintosh Pascal
 **1n_àì ú÷øà àú ÷åáõ äâãøåú áøéøú äîçãì
 **1N<x>_îéèåá öîúé òõ

+ 25 - 4
compiler/msg/errorheu.msg

@@ -4,7 +4,7 @@
 #
 #   Hebrew (UTF-8) language file for Free Pascal Compiler
 #   Contributed by Ido Kanner <idokan at gmail.com> and Dotan Kamber <kamberd at yahoo.com>
-#   Based on errore.msg of SVN revision 7423
+#   Based on errore.msg of SVN revision 8090
 #
 #   See the file COPYING.FPC, included in this distribution,
 #   for details about the copyright.
@@ -350,6 +350,8 @@ scan_e_only_packset=02080_E_ערך של אריזה לא חוקי
 scan_w_pic_ignored=02081_W_מתעלם מהוראת PIC
 % Several targets like windows do not support the PIC directive and need it to be
 % ignored.
+scan_w_unsupported_switch_by_target=02082_W_המתג "$1" אינו נתמך בסוג תוצאה שנבחר
+% Some compiler switches like $E are not supported by all targets.
 % \end{description}
 #
 # Parser
@@ -850,7 +852,7 @@ parser_e_ill_property_storage_sym=03155_E_הסימול אינו יכול להש
 % You can't use this type of symbol as storage specifier in property
 % declaration. You can use only methods with the result type boolean,
 % boolean class fields or boolean constants
-parser_e_only_publishable_classes_can__be_published=03156_E_רק מחלקה המהודרת במצב $M+ יכולה להיות איזור ה published
+parser_e_only_publishable_classes_can_be_published=03156_E_רק מחלקה המהודרת במצב $M+ יכולה להיות איזור ה published
 % In the published section of a class can be only class as fields used which
 % are compiled in \var{\{\$M+\}} or which are derived from such a class. Normally
 % such a class should be derived from TPersitent
@@ -1133,6 +1135,12 @@ parser_e_initialized_not_for_external=03233_E_לא ניתן לאתחל ערך ב
 % Variables declared as external can not be initialized with a default value.
 parser_e_illegal_function_result=03234_E_טיפוס החזרה של הפונקציה אינו חוקי
 % Some types like file types can not be used as function result
+parser_e_no_common_type=03235_E_אין טיפוס משותף ל "$1" ו "$2"
+% To perform an operation beween integers, the compiler converts both operands
+% to their common type, which appears to be an invalid type. To determine the
+% common type of the operands, the compiler takes the minimum of the minimal values
+% of both types, and the maximum of the maximal values of both types. The common
+% type is then minimum..maximum.
 % \end{description}
 #
 # Type Checking
@@ -1398,6 +1406,20 @@ type_e_cant_export_local=04077_E_לא ניתן לייצא שיגרה המסומ
 type_e_not_automatable=04078_E_הטיפוס אינו אוטומט: "$1"
 % Only byte, integer, longint, smallint, currency, single, double, ansistring,
 % widestring, tdatetime, variant, olevariant, wordbool and all interfaces are automatable.
+type_h_convert_add_operands_to_prevent_overflow=04079_H_המרת האופרנד ל"$1" לפני פעולת החיבור, יכול למנוע שגיאות גלישה.
+% Adding two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the addition.
+type_h_convert_sub_operands_to_prevent_overflow=04080_H_המרת האופרנד ל"$1" לפני פעולת החיבור יכולה למנוע שגיאות גלישה.
+% Subtracting two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the subtraction.
+type_h_convert_mul_operands_to_prevent_overflow=04081_H_המרת האופרנד "$1" לפני פעולת הכפל יכולה למנוע שגיאות גלישה.
+% Multiplying two types can cause overflow errors. Since you are converting the result to a larger type, you
+% could prevent such errors by converting the operands to this type before doing the multiplication.
+type_w_pointer_to_signed=04082_W_המרת מצביעים למספרים שלמים עם סימן עלולה לגרום לשגיאות בתוצאות השוואה ובטווחים. יש להשתמש במקום זאת בטיפוס ללא סימן.
+% The virtual address space on 32-bit machines runs from $00000000 to $ffffffff. Many operating systems allow you to
+% allocate memory above $80000000, for example both Windows and Linux allow pointers in the range $0000000 to $bfffffff.
+% If you convert pointers to signed types, this can cause overflow and range check errors, but also $80000000 < $7fffffff.
+% This can cause random errors in code like "if p>q".
 % \end{description}
 #
 # Symtable
@@ -2214,7 +2236,7 @@ unit_w_cant_compile_unit_with_changed_incfile=10040_W_לא ניתן להדר א
 % some source files were not found, so recompilation is impossible.
 unit_u_source_modified=10041_U_הקובץ $1 חדש יותר מהקובץ PPU $2
 % A modified source file for a compiler unit was found.
-unit_u_ppu_invalid_fpumode=10042_U_משתמש ביחידה אשר לא הודרה בצורה נכונה במצב FPU
+unit_u_ppu_invalid_fpumode=10042_U_מנסה להשתמש ביחידה אשר הודרה למצב FPU שונה
 % Trying to compile code while using units which were not compiled with
 % the same floating point format mode. Either all code should be compiled
 % with FPU emulation on, or with FPU emulation off.
@@ -2533,7 +2555,6 @@ S*2Aas_אסוף עם GNU AS
 **2Mobjfpc_אפשר כמה תוספות של Delphi 2
 **2Mdelphi_מנסה להיות תואם Delphi
 **2Mtp_מנסה להיות תואם ל TP/BP 7.0
-**2Mgpc_מנסה להיות תואם gpc
 **2Mmacpas_מנסה להיות תואם ללהג של Macintosh Pascal
 **1n_אל תקרא את קובץ הגדרות ברירת המחדל
 **1N<x>_מיטוב צמתי עץ

+ 4 - 2
compiler/msgidx.inc

@@ -103,6 +103,8 @@ const
   scan_e_only_packset=02080;
   scan_w_pic_ignored=02081;
   scan_w_unsupported_switch_by_target=02082;
+  scan_w_frameworks_darwin_only=02084;
+  scan_e_illegal_minfpconstprec=02085;
   parser_e_syntax_error=03000;
   parser_e_dont_nest_interrupt=03004;
   parser_w_proc_directive_ignored=03005;
@@ -729,9 +731,9 @@ const
   option_info=11024;
   option_help_pages=11025;
 
-  MsgTxtSize = 43716;
+  MsgTxtSize = 45027;
 
   MsgIdxMax : array[1..20] of longint=(
-    24,83,237,83,63,49,107,22,135,60,
+    24,86,237,83,63,49,107,22,135,60,
     42,1,1,1,1,1,1,1,1,1
   );

File diff suppressed because it is too large
+ 302 - 297
compiler/msgtxt.inc


+ 18 - 5
compiler/nadd.pas

@@ -32,6 +32,9 @@ interface
 
     type
        taddnode = class(tbinopnode)
+       private
+          function pass_typecheck_internal:tnode;
+       public
           resultrealdef : tdef;
           constructor create(tt : tnodetype;l,r : tnode);override;
           function pass_1 : tnode;override;
@@ -805,15 +808,25 @@ implementation
 
 
     function taddnode.pass_typecheck:tnode;
+      begin
+        { This function is small to keep the stack small for recursive of
+          large + operations }
+        typecheckpass(left);
+        typecheckpass(right);
+        result:=pass_typecheck_internal;
+      end;
+
+
+    function taddnode.pass_typecheck_internal:tnode;
       var
         hp      : tnode;
-        lt,rt   : tnodetype;
         rd,ld   : tdef;
-        ot      : tnodetype;
         hsym    : tfieldvarsym;
         i       : longint;
         strtype : tstringtype;
         b       : boolean;
+        lt,rt   : tnodetype;
+        ot      : tnodetype;
 {$ifdef state_tracking}
         factval : Tnode;
         change  : boolean;
@@ -821,9 +834,6 @@ implementation
 
       begin
          result:=nil;
-         { first do the two subtrees }
-         typecheckpass(left);
-         typecheckpass(right);
          { both left and right need to be valid }
          set_varstate(left,vs_read,[vsf_must_be_valid]);
          set_varstate(right,vs_read,[vsf_must_be_valid]);
@@ -1353,6 +1363,9 @@ implementation
            pchar is converted to string }
          else if (rd.typ=stringdef) or
                  (ld.typ=stringdef) or
+                 { stringconstn's can be arraydefs }
+                 (lt=stringconstn) or
+                 (rt=stringconstn) or
                  ((is_pchar(rd) or is_chararray(rd) or is_char(rd) or is_open_chararray(rd) or
                    is_pwidechar(rd) or is_widechararray(rd) or is_widechar(rd) or is_open_widechararray(rd)) and
                   (is_pchar(ld) or is_chararray(ld) or is_char(ld) or is_open_chararray(ld) or

+ 5 - 6
compiler/nbas.pas

@@ -317,9 +317,8 @@ implementation
          if (not (cs_extsyntax in current_settings.moduleswitches)) and
             assigned(left.resultdef) and
             not((left.nodetype=calln) and
-                { don't complain when funcretrefnode is set, because then the
-                  value is already used. And also not for constructors }
-                (assigned(tcallnode(left).funcretnode) or
+                { don't complain when the value is used. And also not for constructors }
+                ((cnf_return_value_used in tcallnode(left).callnodeflags) or
                  (tcallnode(left).procdefinition.proctypeoption=potype_constructor))) and
             not(is_void(left.resultdef)) then
            CGMessage(parser_e_illegal_expression);
@@ -778,7 +777,7 @@ implementation
     procedure ttempcreatenode.printnodedata(var t:text);
       begin
         inherited printnodedata(t);
-        writeln(t,printnodeindention,'size = ',size,', temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptruint(tempinfo),sizeof(ptruint)*2));
+        writeln(t,printnodeindention,'size = ',size,', temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptrint(tempinfo),sizeof(ptrint)*2));
       end;
 
 
@@ -913,7 +912,7 @@ implementation
     procedure ttemprefnode.printnodedata(var t:text);
       begin
         inherited printnodedata(t);
-        writeln(t,printnodeindention,'temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptruint(tempinfo),sizeof(ptruint)*2));
+        writeln(t,printnodeindention,'temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptrint(tempinfo),sizeof(ptrint)*2));
       end;
 
 
@@ -1026,7 +1025,7 @@ implementation
     procedure ttempdeletenode.printnodedata(var t:text);
       begin
         inherited printnodedata(t);
-        writeln(t,printnodeindention,'release_to_normal: ',release_to_normal,', temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptruint(tempinfo),sizeof(ptruint)*2));
+        writeln(t,printnodeindention,'release_to_normal: ',release_to_normal,', temptypedef = "',tempinfo^.typedef.GetTypeName,'", tempinfo = $',hexstr(ptrint(tempinfo),sizeof(ptrint)*2));
       end;
 
 begin

+ 6 - 1
compiler/ncal.pas

@@ -999,7 +999,12 @@ implementation
                   begin
                     case parasym.varspez of
                       vs_out :
-                        set_varstate(left,vs_readwritten,[]);
+                        begin
+                          { first set written separately to avoid false }
+                          { uninitialized warnings (tbs/tb0542)         }
+                          set_varstate(left,vs_written,[]);
+                          set_varstate(left,vs_readwritten,[]);
+                        end;
                       vs_var :
                         set_varstate(left,vs_readwritten,[vsf_must_be_valid,vsf_use_hints]);
                       else

+ 7 - 0
compiler/ncgflw.pas

@@ -864,6 +864,13 @@ implementation
          load_all_regvars(current_asmdata.CurrAsmList);
 {$endif OLDREGVARS}
          cg.a_label(current_asmdata.CurrAsmList,getasmlabel);
+
+         { Write also extra label if this label was referenced from
+           assembler block }
+         if assigned(labsym) and
+            assigned(labsym.asmblocklabel) then
+           cg.a_label(current_asmdata.CurrAsmList,labsym.asmblocklabel);
+
          secondpass(left);
       end;
 

+ 2 - 2
compiler/ncgld.pas

@@ -400,9 +400,9 @@ implementation
          begin
            secondpass(right);
            { increment source reference counter, this is
-             useless for string constants}
+             useless for constants }
            if (right.resultdef.needs_inittable) and
-              (right.nodetype<>stringconstn) then
+              not is_constnode(right) then
             begin
               location_force_mem(current_asmdata.CurrAsmList,right.location);
               location_get_data_ref(current_asmdata.CurrAsmList,right.location,href,false);

+ 2 - 0
compiler/ncgset.pas

@@ -845,6 +845,8 @@ implementation
                    if cs_opt_size in current_settings.optimizerswitches  then
                      begin
                        if has_jumptable and
+                          (min_label>=int64(low(aint))) and
+                          (max_label<=high(aint)) and
                           not((labelcnt<=2) or
                               ((max_label-min_label)<0) or
                               ((max_label-min_label)>3*labelcnt)) then

+ 7 - 4
compiler/ncgutil.pas

@@ -1044,7 +1044,7 @@ implementation
                  nil);
              LOC_CFPUREGISTER :
                begin
-                 { initialize fpu regvar by loading from memory }              
+                 { initialize fpu regvar by loading from memory }
                  reference_reset_symbol(href,
                    current_asmdata.RefAsmSymbol(tstaticvarsym(p).mangledname), 0);
                  cg.a_loadfpu_ref_reg(TAsmList(arg), tstaticvarsym(p).initialloc.size,
@@ -1066,7 +1066,10 @@ implementation
         hp : tnode;
       begin
         if (tsym(p).typ in [staticvarsym,localvarsym]) and
-           (tabstractvarsym(p).refs>0) and
+           ((tabstractvarsym(p).refs>0) or
+            { managed return symbols must be inited }
+            ((tsym(p).typ=localvarsym) and (vo_is_funcret in tlocalvarsym(p).varoptions))
+           ) and
            not(vo_is_typed_const in tabstractvarsym(p).varoptions) and
            not(vo_is_external in tabstractvarsym(p).varoptions) and
            not(is_class(tabstractvarsym(p).vardef)) and
@@ -1311,7 +1314,7 @@ implementation
           ressym:=tabstractnormalvarsym(current_procinfo.procdef.parast.Find('self'))
         else
           ressym:=tabstractnormalvarsym(current_procinfo.procdef.funcretsym);
-        if (ressym.refs>0) then
+        if (ressym.refs>0) or (ressym.vardef.needs_inittable) then
           begin
 {$ifdef OLDREGVARS}
             case ressym.localloc.loc of
@@ -2631,8 +2634,8 @@ implementation
                       in the parent procedures }
                     case localloc.loc of
                       LOC_CREGISTER :
-{$ifndef cpu64bit}
                         if (pi_has_goto in current_procinfo.flags) then
+{$ifndef cpu64bit}
                           if def_cgsize(vardef) in [OS_64,OS_S64] then
                             begin
                               cg.a_reg_sync(list,localloc.register64.reglo);

+ 37 - 5
compiler/ncnv.pas

@@ -386,13 +386,31 @@ implementation
                 end;
               if codegenerror then
                break;
+              current_filepos:=p2.fileinfo;
               case p2.resultdef.typ of
                  enumdef,
                  orddef:
                    begin
+                      { widechars are not yet supported }
+                      if is_widechar(p2.resultdef) then
+                        begin
+                          inserttypeconv(p2,cchartype);
+                          if (p2.nodetype<>ordconstn) then
+                            incompatibletypes(cwidechartype,cchartype);
+                        end;
+
                       getrange(p2.resultdef,lr,hr);
                       if assigned(p3) then
                        begin
+                         if is_widechar(p3.resultdef) then
+                           begin
+                             inserttypeconv(p3,cchartype);
+                             if (p3.nodetype<>ordconstn) then
+                               begin
+                                 current_filepos:=p3.fileinfo;
+                                 incompatibletypes(cwidechartype,cchartype);
+                               end;
+                           end;
                          { this isn't good, you'll get problems with
                            type t010 = 0..10;
                                 ts = set of t010;
@@ -405,8 +423,7 @@ implementation
                          }
                          if assigned(hdef) and not(equal_defs(hdef,p3.resultdef)) then
                            begin
-                              current_filepos:=p3.fileinfo;
-                              CGMessage(type_e_typeconflict_in_set);
+                              CGMessagePos(p3.fileinfo,type_e_typeconflict_in_set);
                            end
                          else
                            begin
@@ -875,8 +892,13 @@ implementation
 
       begin
          result:=nil;
-         if left.nodetype=stringconstn then
-          begin
+         if (left.nodetype=stringconstn) and
+            ((not is_widechararray(left.resultdef) and
+              not is_widestring(left.resultdef)) or
+             (tstringdef(resultdef).stringtype=st_widestring) or
+             { non-ascii chars would be replaced with '?' -> loses info }
+             not hasnonasciichars(pcompilerwidestring(tstringconstnode(left).value_str))) then
+           begin
              tstringconstnode(left).changestringtype(resultdef);
              result:=left;
              left:=nil;
@@ -1161,7 +1183,17 @@ implementation
          else
            if is_pchar(resultdef) and
               is_widestring(left.resultdef) then
-             inserttypeconv(left,cansistringtype);
+             begin
+               inserttypeconv(left,cansistringtype);
+               { the second pass of second_cstring_to_pchar expects a  }
+               { strinconstn, but this may become a call to the        }
+               { widestring manager in case left contains "high ascii" }
+               if (left.nodetype<>stringconstn) then
+                 begin
+                   result:=left;
+                   left:=nil;
+                 end;
+             end;
       end;
 
 

+ 9 - 3
compiler/nflw.pas

@@ -150,7 +150,9 @@ interface
           copiedto : tlabelnode;
           { contains all goto nodesrefering to this label }
           referinggotonodes : TFPObjectList;
-          constructor create(l:tnode);virtual;
+          { original labelsym, used for writing label referenced from assembler block }
+          labsym : tlabelsym;
+          constructor create(l:tnode;alabsym:tlabelsym);virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderefimpl;override;
@@ -1138,10 +1140,11 @@ implementation
                              TLABELNODE
 *****************************************************************************}
 
-    constructor tlabelnode.create(l:tnode);
+    constructor tlabelnode.create(l:tnode;alabsym:tlabelsym);
       begin
         inherited create(labeln,l);
         exceptionblock:=aktexceptblock;
+        labsym:=alabsym;
       end;
 
 
@@ -1426,7 +1429,10 @@ implementation
          n : tonnode;
       begin
          n:=tonnode(inherited dogetcopy);
-         n.excepTSymtable:=excepTSymtable.getcopy;
+         if assigned(exceptsymtable) then
+           n.exceptsymtable:=exceptsymtable.getcopy
+         else
+           n.exceptsymtable:=nil;
          n.excepttype:=excepttype;
          result:=n;
       end;

+ 4 - 1
compiler/ninl.pas

@@ -1958,8 +1958,11 @@ implementation
                                set_varstate(left,vs_read,[]);
                                result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry))
                             end
+                           else if not is_ansistring(left.resultdef) and
+                                   not is_widestring(left.resultdef) then
+                             result:=cordconstnode.create(tstringdef(left.resultdef).len,u8inttype,true)
                            else
-                             result:=cordconstnode.create(tstringdef(left.resultdef).len,u8inttype,true);
+                             CGMessage(type_e_mismatch)
                          end;
                      end;
                     else

+ 26 - 132
compiler/nld.pas

@@ -496,81 +496,6 @@ implementation
         set_unique(left);
 
         typecheckpass(left);
-
-{$ifdef old_append_str}
-        if is_ansistring(left.resultdef) then
-          begin
-            { fold <ansistring>:=<ansistring>+<char|shortstring|ansistring> }
-            if (right.nodetype=addn) and
-               left.isequal(tbinarynode(right).left) and
-               { don't fold multiple concatenations else we could get trouble
-                 with multiple uses of s
-               }
-               (tbinarynode(right).left.nodetype<>addn) and
-               (tbinarynode(right).right.nodetype<>addn) then
-              begin
-                { don't do a typecheckpass(right), since then the addnode }
-                { may insert typeconversions that make this optimization   }
-                { opportunity quite difficult to detect (JM)               }
-                typecheckpass(tbinarynode(right).left);
-                typecheckpass(tbinarynode(right).right);
-                if (tbinarynode(right).right.nodetype=stringconstn) or
-		   is_char(tbinarynode(right).right.resultdef) or
-                   is_shortstring(tbinarynode(right).right.resultdef) or
-                   is_ansistring(tbinarynode(right).right.resultdef) then
-                  begin
-                    { remove property flag so it'll not trigger an error }
-                    exclude(left.flags,nf_isproperty);
-                    { generate call to helper }
-                    hp:=ccallparanode.create(tbinarynode(right).right,
-                      ccallparanode.create(left,nil));
-                    if is_char(tbinarynode(right).right.resultdef) then
-                      result:=ccallnode.createintern('fpc_'+Tstringdef(left.resultdef).stringtypname+'_append_char',hp)
-                    else if is_shortstring(tbinarynode(right).right.resultdef) then
-                      result:=ccallnode.createintern('fpc_'+Tstringdef(left.resultdef).stringtypname+'_append_shortstring',hp)
-                    else
-                      result:=ccallnode.createintern('fpc_'+Tstringdef(left.resultdef).stringtypname+'_append_ansistring',hp);
-                    tbinarynode(right).right:=nil;
-                    left:=nil;
-                    exit;
-                 end;
-              end;
-          end
-        else
-
-         if is_shortstring(left.resultdef) then
-          begin
-            { fold <shortstring>:=<shortstring>+<shortstring>,
-              <shortstring>+<char> is handled by an optimized node }
-            if (right.nodetype=addn) and
-               left.isequal(tbinarynode(right).left) and
-               { don't fold multiple concatenations else we could get trouble
-                 with multiple uses of s }
-               (tbinarynode(right).left.nodetype<>addn) and
-               (tbinarynode(right).right.nodetype<>addn) then
-              begin
-                { don't do a typecheckpass(right), since then the addnode }
-                { may insert typeconversions that make this optimization   }
-                { opportunity quite difficult to detect (JM)               }
-                typecheckpass(tbinarynode(right).left);
-                typecheckpass(tbinarynode(right).right);
-                if is_shortstring(tbinarynode(right).right.resultdef) then
-                  begin
-                    { remove property flag so it'll not trigger an error }
-                    exclude(left.flags,nf_isproperty);
-                    { generate call to helper }
-                    hp:=ccallparanode.create(tbinarynode(right).right,
-                      ccallparanode.create(left,nil));
-                    if is_shortstring(tbinarynode(right).right.resultdef) then
-                      result:=ccallnode.createintern('fpc_shortstr_append_shortstr',hp);
-                    tbinarynode(right).right:=nil;
-                    left:=nil;
-                    exit;
-                 end;
-              end;
-          end;
-{$endif old_append_str}
-
         typecheckpass(right);
         set_varstate(right,vs_read,[vsf_must_be_valid]);
         set_varstate(left,vs_written,[]);
@@ -628,7 +553,8 @@ implementation
                      (tstringconstnode(right).len > tstringdef(left.resultdef).len) then
                      cgmessage(type_w_string_too_long);
                   inserttypeconv(right,left.resultdef);
-                  if (tstringconstnode(right).len=0) then
+                  if (right.nodetype=stringconstn) and
+                     (tstringconstnode(right).len=0) then
                     useshelper:=false;
                 end;
              { rest is done in pass 1 (JM) }
@@ -638,26 +564,20 @@ implementation
          end
         else
           begin
-           { check if the assignment may cause a range check error }
-           check_ranges(fileinfo,right,left.resultdef);
-           inserttypeconv(right,left.resultdef);
+            { check if the assignment may cause a range check error }
+            check_ranges(fileinfo,right,left.resultdef);
+            inserttypeconv(right,left.resultdef);
           end;
 
         { call helpers for interface }
         if is_interfacecom(left.resultdef) then
          begin
-           if right.resultdef.is_related(left.resultdef) then
-             begin
-               hp:=
-                 ccallparanode.create(
-                   ctypeconvnode.create_internal(right,voidpointertype),
-                 ccallparanode.create(
-                   ctypeconvnode.create_internal(left,voidpointertype),
-                   nil));
-               result:=ccallnode.createintern('fpc_intf_assign',hp)
-             end
-           else
+	   { Normal interface assignments are handled by the generic refcount incr/decr }
+           if not right.resultdef.is_related(left.resultdef) then
              begin
+               { remove property flag to avoid errors, see comments for }
+               { tf_winlikewidestring assignments below                 }
+               exclude(left.flags,nf_isproperty);
                hp:=
                  ccallparanode.create(
                    cguidconstnode.create(tobjectdef(left.resultdef).iidguid^),
@@ -667,16 +587,14 @@ implementation
                    ctypeconvnode.create_internal(left,voidpointertype),
                    nil)));
                result:=ccallnode.createintern('fpc_intf_assign_by_iid',hp);
+               left:=nil;
+               right:=nil;
+               exit;
              end;
-
-           left:=nil;
-           right:=nil;
-           exit;
-         end;
-
+         end
         { call helpers for variant, they can contain non ref. counted types like
           vararrays which must be really copied }
-        if left.resultdef.typ=variantdef then
+        else if left.resultdef.typ=variantdef then
          begin
            hp:=ccallparanode.create(ctypeconvnode.create_internal(
                  caddrnode.create_internal(right),voidpointertype),
@@ -687,11 +605,10 @@ implementation
            left:=nil;
            right:=nil;
            exit;
-         end;
-
+         end
         { call helpers for composite types containing automated types }
-        if (left.resultdef.needs_inittable) and
-           (left.resultdef.typ in [arraydef,objectdef,recorddef]) then
+        else if (left.resultdef.needs_inittable) and
+            (left.resultdef.typ in [arraydef,objectdef,recorddef]) then
          begin
            hp:=ccallparanode.create(caddrnode.create_internal(
                   crttinode.create(tstoreddef(left.resultdef),initrtti)),
@@ -704,10 +621,9 @@ implementation
            left:=nil;
            right:=nil;
            exit;
-         end;
-
+         end
         { call helpers for windows widestrings, they aren't ref. counted }
-        if (tf_winlikewidestring in target_info.flags) and is_widestring(left.resultdef) then
+        else if (tf_winlikewidestring in target_info.flags) and is_widestring(left.resultdef) then
          begin
            hp:=ccallparanode.create(ctypeconvnode.create_internal(right,voidpointertype),
                ccallparanode.create(ctypeconvnode.create_internal(left,voidpointertype),
@@ -794,34 +710,12 @@ implementation
               if (right.nodetype<>stringconstn) or
                  (tstringconstnode(right).len<>0) then
                begin
-{$ifdef old_append_str}
-                 if (cs_opt_level1 in current_settings.optimizerswitches) and
-                    (right.nodetype in [calln,blockn]) and
-                    (left.nodetype = temprefn) and
-                    is_shortstring(right.resultdef) and
-                    not is_open_string(left.resultdef) and
-                    (tstringdef(left.resultdef).len = 255) then
-                   begin
-                     { the blocknode case is handled in pass_generate_code at the temp }
-                     { reference level (mainly for callparatemp)  (JM)     }
-                     if (right.nodetype = calln) then
-                       begin
-                         tcallnode(right).funcretnode := left;
-                         result := right;
-                       end
-                     else
-                       exit;
-                   end
-                 else
-{$endif old_append_str}
-                   begin
-                     hp:=ccallparanode.create
-                           (right,
-                      ccallparanode.create(cinlinenode.create
-                           (in_high_x,false,left.getcopy),nil));
-                     result:=ccallnode.createinternreturn('fpc_'+tstringdef(right.resultdef).stringtypname+'_to_shortstr',hp,left);
-                     firstpass(result);
-                   end;
+                 hp:=ccallparanode.create
+                       (right,
+                  ccallparanode.create(cinlinenode.create
+                       (in_high_x,false,left.getcopy),nil));
+                 result:=ccallnode.createinternreturn('fpc_'+tstringdef(right.resultdef).stringtypname+'_to_shortstr',hp,left);
+                 firstpass(result);
                  left:=nil;
                  right:=nil;
                  exit;

+ 13 - 14
compiler/nmat.pas

@@ -121,6 +121,12 @@ implementation
                 end;
                 exit;
               end;
+            if tordconstnode(right).value = 0 then
+              begin
+                Message(parser_e_division_by_zero);
+                { recover }
+                tordconstnode(right).value := 1;
+              end;
           end;
 
         if is_constintnode(right) and is_constintnode(left) then
@@ -155,7 +161,6 @@ implementation
       var
         hp,t : tnode;
         rd,ld : torddef;
-        rv : tconstexprint;
       begin
          result:=nil;
          typecheckpass(left);
@@ -192,18 +197,6 @@ implementation
          rd:=torddef(right.resultdef);
          ld:=torddef(left.resultdef);
 
-         { check for division by zero }
-         if is_constintnode(right) then
-           begin
-             rv:=tordconstnode(right).value;
-             if (rv=0) then
-               begin
-                 Message(parser_e_division_by_zero);
-                 { recover }
-                 rv:=1;
-               end;
-            end;
-
          { if one operand is a cardinal and the other is a positive constant, convert the }
          { constant to a cardinal as well so we don't have to do a 64bit division (JM)    }
          { Do the same for qwords and positive constants as well, otherwise things like   }
@@ -528,7 +521,13 @@ implementation
            the same as 'shl 1'. It's ugly but compatible with delphi/tp/gcc }
          if (not is_64bit(left.resultdef)) and
             (torddef(left.resultdef).ordtype<>u32bit) then
-           inserttypeconv(left,s32inttype);
+           begin
+             { keep singness of orignal type }
+             if is_signed(left.resultdef) then
+               inserttypeconv(left,s32inttype)
+             else
+               inserttypeconv(left,u32inttype);
+           end;
 
          inserttypeconv(right,sinttype);
 

+ 36 - 48
compiler/nobj.pas

@@ -128,7 +128,7 @@ implementation
     uses
        SysUtils,
        globals,verbose,systems,
-       symtable,symconst,symtype,defcmp,
+       symbase,symtable,symconst,symtype,defcmp,
        dbgbase,
        ncgrtti
        ;
@@ -308,8 +308,9 @@ implementation
                               MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false));
                           end;
                       end
-                    { same parameters }
-                    else if (compare_paras(procdefcoll^.data.paras,pd.paras,cp_all,[])>=te_equal) then
+                    { same parameter and return types (parameter specifiers will be checked below) }
+                    else if (compare_paras(procdefcoll^.data.paras,pd.paras,cp_none,[])>=te_equal) and
+                            compatible_childmethod_resultdef(procdefcoll^.data.returndef,pd.returndef) then
                       begin
                         { overload is inherited }
                         if (po_overload in procdefcoll^.data.procoptions) then
@@ -324,9 +325,10 @@ implementation
                             include(pd.procoptions,po_hascallingconvention);
                           end;
 
-                        { the flags have to match except abstract and override }
-                        { only if both are virtual !!  }
-                        if (procdefcoll^.data.proccalloption<>pd.proccalloption) or
+                        { All parameter specifiers and some procedure the flags have to match
+                          except abstract and override }
+                        if (compare_paras(procdefcoll^.data.paras,pd.paras,cp_all,[])<te_equal) or
+                           (procdefcoll^.data.proccalloption<>pd.proccalloption) or
                            (procdefcoll^.data.proctypeoption<>pd.proctypeoption) or
                            ((procdefcoll^.data.procoptions*po_comp)<>(pd.procoptions*po_comp)) then
                            begin
@@ -334,19 +336,6 @@ implementation
                              tprocsym(procdefcoll^.data.procsym).write_parameter_lists(pd);
                            end;
 
-                        { error, if the return types aren't equal }
-                        if not compatible_childmethod_resultdef(procdefcoll^.data.returndef,pd.returndef) then
-                          begin
-                            if not((m_delphi in current_settings.modeswitches) and
-                                   is_interface(_class)) then
-                              Message2(parser_e_overridden_methods_not_same_ret,pd.fullprocname(false),
-                                       procdefcoll^.data.fullprocname(false))
-                            else
-                              { Delphi allows changing the result type of interface methods from anything to
-                                anything (JM) }
-                              Message2(parser_w_overridden_methods_not_same_ret,pd.fullprocname(false),
-                                       procdefcoll^.data.fullprocname(false));
-                          end;
                         { check if the method to override is visible, check is only needed
                           for the current parsed class. Parent classes are already validated and
                           need to include all virtual methods including the ones not visible in the
@@ -382,7 +371,11 @@ implementation
                           if (pd._class=procdefcoll^.data._class) then
                             MessagePos(pd.fileinfo,parser_e_overloaded_have_same_parameters)
                           else if (_class=pd._class) and not(po_reintroduce in pd.procoptions) then
-                            MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false));
+                            if not is_object(_class) then
+                              MessagePos1(pd.fileinfo,parser_w_should_use_override,pd.fullprocname(false))
+                            else
+                              { objects don't allow starting a new virtual tree }
+                              MessagePos1(pd.fileinfo,parser_e_header_dont_match_forward,procdefcoll^.data.fullprocname(false));
                         end;
                      end;
                   end
@@ -451,36 +444,37 @@ implementation
         po_comp = [po_classmethod,po_staticmethod,po_interrupt,po_iocheck,po_msgstr,po_msgint,
                    po_exports,po_varargs,po_explicitparaloc,po_nostackframe];
       var
-        sym: tsym;
         implprocdef : Tprocdef;
         i: cardinal;
+        hclass : tobjectdef;
+        hashedid : THashedIDString;
+        srsym      : tsym;
       begin
         result:=nil;
-
-        sym:=tsym(search_class_member(_class,name));
-        if assigned(sym) and
-           (sym.typ=procsym) then
+        hashedid.id:=name;
+        hclass:=_class;
+        while assigned(hclass) do
           begin
-            { when the definition has overload directive set, we search for
-              overloaded definitions in the class, this only needs to be done once
-              for class entries as the tree keeps always the same }
-            if (not tprocsym(sym).overloadchecked) and
-               (po_overload in tprocdef(tprocsym(sym).ProcdefList[0]).procoptions) and
-               (tprocsym(sym).owner.symtabletype=ObjectSymtable) then
-             search_class_overloads(tprocsym(sym));
-
-            for i:=0 to Tprocsym(sym).ProcdefList.Count-1 do
+            srsym:=tsym(hclass.symtable.FindWithHash(hashedid));
+            if assigned(srsym) and
+               (srsym.typ=procsym) then
               begin
-                implprocdef:=tprocdef(Tprocsym(sym).ProcdefList[i]);
-                if (compare_paras(proc.paras,implprocdef.paras,cp_none,[])>=te_equal) and
-                   (proc.proccalloption=implprocdef.proccalloption) and
-                   (proc.proctypeoption=implprocdef.proctypeoption) and
-                   ((proc.procoptions*po_comp)=((implprocdef.procoptions+[po_virtualmethod])*po_comp)) then
+                for i:=0 to Tprocsym(srsym).ProcdefList.Count-1 do
                   begin
-                    result:=implprocdef;
-                    exit;
+                    implprocdef:=tprocdef(tprocsym(srsym).ProcdefList[i]);
+                    if (implprocdef.procsym=tprocsym(srsym)) and
+                       (compare_paras(proc.paras,implprocdef.paras,cp_all,[cpo_ignorehidden,cpo_comparedefaultvalue])>=te_equal) and
+                       compatible_childmethod_resultdef(proc.returndef,implprocdef.returndef) and
+                       (proc.proccalloption=implprocdef.proccalloption) and
+                       (proc.proctypeoption=implprocdef.proctypeoption) and
+                       ((proc.procoptions*po_comp)=((implprocdef.procoptions+[po_virtualmethod])*po_comp)) then
+                      begin
+                        result:=implprocdef;
+                        exit;
+                      end;
                   end;
               end;
+            hclass:=hclass.childof;
           end;
       end;
 
@@ -513,13 +507,7 @@ implementation
                   implprocdef:=intf_search_procdef_by_name(tprocdef(def),tprocdef(def).procsym.name);
                 { Add procdef to the implemented interface }
                 if assigned(implprocdef) then
-                  begin
-                    if (compare_paras(tprocdef(def).paras,implprocdef.paras,cp_all,[cpo_ignorehidden,cpo_comparedefaultvalue])<te_equal) or
-                       not compatible_childmethod_resultdef(tprocdef(def).returndef,implprocdef.returndef) then
-                      MessagePos1(tprocdef(implprocdef).fileinfo,parser_e_header_dont_match_forward,
-                                  tprocdef(def).fullprocname(false));
-                    ImplIntf.AddImplProc(implprocdef)
-                  end
+                  ImplIntf.AddImplProc(implprocdef)
                 else
                   if ImplIntf.IType = etStandard then
                     Message1(sym_e_no_matching_implementation_found,tprocdef(def).fullprocname(false));

+ 12 - 0
compiler/nutils.pas

@@ -537,6 +537,18 @@ implementation
                cnilnode.create
                ));
           end
+        else if is_interfacecom(p.resultdef) then
+          begin
+            result:=internalstatements(newstatement);
+            addstatement(newstatement,ccallnode.createintern('fpc_intf_decr_ref',
+                  ccallparanode.create(
+                    ctypeconvnode.create_internal(p,voidpointertype),
+                  nil)));
+            addstatement(newstatement,cassignmentnode.create(
+               ctypeconvnode.create_internal(p.getcopy,voidpointertype),
+               cnilnode.create
+               ));
+          end
         else
           result:=ccallnode.createintern('fpc_finalize',
                 ccallparanode.create(

+ 6 - 4
compiler/ogbase.pas

@@ -812,7 +812,8 @@ implementation
           'debug_frame','debug_info','debug_line','debug_abbrev',
           'fpc',
           'toc',
-          'init'
+          'init',
+          'fini'
         );
       var
         sep : string[3];
@@ -860,7 +861,8 @@ implementation
           {debug_abbrev} [oso_Data,oso_noload,oso_debug],
           {fpc} [oso_Data,oso_load,oso_write,oso_keep],
           {toc} [oso_Data,oso_load,oso_readonly],
-          {init} [oso_Data,oso_load,oso_readonly,oso_executable,oso_keep]
+          {init} [oso_Data,oso_load,oso_readonly,oso_executable,oso_keep],
+          {fini} [oso_Data,oso_load,oso_readonly,oso_executable,oso_keep]
         );
       begin
         result:=secoptions[atype];
@@ -1639,8 +1641,8 @@ implementation
     procedure TExeOutput.Order_ObjSectionList(ObjSectionList : TFPObjectList);
       begin
       end;
-      
-      
+
+
     procedure TExeOutput.Order_Symbol(const aname:string);
       var
         ObjSection : TObjSection;

+ 2 - 1
compiler/ogcoff.pas

@@ -486,7 +486,8 @@ implementation
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '',
-          '.init'
+          '.init',
+          '.fini'
         );
 
 const go32v2stub : array[0..2047] of byte=(

+ 4 - 2
compiler/ogelf.pas

@@ -583,7 +583,8 @@ implementation
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '.toc',
-          '.init'
+          '.init',
+          '.fini'
         );
         secnames_pic : array[TAsmSectiontype] of string[17] = ('',
           '.text',
@@ -600,7 +601,8 @@ implementation
           '.debug_frame','.debug_info','.debug_line','.debug_abbrev',
           '.fpc',
           '.toc',
-          '.init'
+          '.init',
+          '.fini'
         );
       var
         sep : string[3];

+ 129 - 48
compiler/options.pas

@@ -27,7 +27,7 @@ interface
 
 uses
   CClasses,CFileUtils,
-  globtype,globals,verbose,systems,cpuinfo;
+  globtype,globals,verbose,systems,cpuinfo, comprsrc;
 
 Type
   TOption=class
@@ -40,7 +40,8 @@ Type
     ParaIncludePath,
     ParaUnitPath,
     ParaObjectPath,
-    ParaLibraryPath : TSearchPathList;
+    ParaLibraryPath,
+    ParaFrameworkPath : TSearchPathList;
     ParaAlignment   : TAlignmentInfo;
     Constructor Create;
     Destructor Destroy;override;
@@ -262,6 +263,9 @@ begin
 {$ifdef powerpc}
       'P',
 {$endif}
+{$ifdef powerpc64}
+      'p',
+{$endif}
 {$ifdef sparc}
       'S',
 {$endif}
@@ -488,15 +492,24 @@ begin
                            include(init_settings.moduleswitches,cs_fp_emulation);
                        end;
 {$endif cpufpemu}
-                   'f' :
-                     begin
-                       s:=upper(copy(more,j+1,length(more)-j));
-                       if not(SetFpuType(s,init_settings.fputype)) then
-                         IllegalPara(opt);
-                       break;
-                     end;
+                    'f' :
+                      begin
+                        s:=upper(copy(more,j+1,length(more)-j));
+                        if not(SetFpuType(s,init_settings.fputype)) then
+                          IllegalPara(opt);
+                        break;
+                      end;
+                    'F' :
+                       begin
+                         if not SetMinFPConstPrec(copy(more,j+1,length(more)-j),init_settings.minfpconstprec) then
+                           IllegalPara(opt);
+                         break;
+                       end;
                     'g' :
-                      include(init_settings.moduleswitches,cs_create_pic);
+                       if tf_no_pic_supported in target_info.flags then
+                         message(scan_w_pic_ignored)
+                       else
+                         include(init_settings.moduleswitches,cs_create_pic);
                     'h' :
                       begin
                          val(copy(more,j+1,length(more)-j),heapsize,code);
@@ -672,7 +685,12 @@ begin
            'f' :
              begin
                if more='PIC' then
-                 include(init_settings.moduleswitches,cs_create_pic)
+                 begin
+                   if tf_no_pic_supported in target_info.flags then
+                     message(scan_w_pic_ignored)
+                   else
+                     include(init_settings.moduleswitches,cs_create_pic)
+                 end
                else
                  IllegalPara(opt);
              end;
@@ -696,12 +714,22 @@ begin
                      else
                        init_settings.sourcecodepage:=more;
                    end;
+                 'C' :
+                   RCCompiler := More;
                  'D' :
                    utilsdirectory:=FixPath(More,true);
                  'e' :
                    SetRedirectFile(More);
                  'E' :
                    OutputExeDir:=FixPath(More,true);
+                 'f' :
+                     if (target_info.system in systems_darwin) then
+                       if ispara then
+                         ParaFrameworkPath.AddPath(More,false)
+                       else
+                         frameworksearchpath.AddPath(More,true)
+                     else
+                       IllegalPara(opt);
                  'i' :
                    begin
                      if ispara then
@@ -742,6 +770,8 @@ begin
                    end;
                  'r' :
                    Msgfilename:=More;
+                 'R' :
+                   ResCompiler := More;
                  'u' :
                    begin
                      if ispara then
@@ -879,8 +909,7 @@ begin
              end;
 
            'l' :
-             if not UnSetBool(more,0) then
-               ParaLogo:=true;
+             ParaLogo:=not UnSetBool(more,0);
 
            'm' :
              parapreprocess:=not UnSetBool(more,0);
@@ -1232,6 +1261,18 @@ begin
                         else
                           apptype:=app_cui;
                       end;
+                    'b':
+                      begin
+                        if (target_info.system in systems_darwin) then
+                          begin
+                            if not UnsetBool(More, j) then
+                              apptype:=app_bundle
+                            else
+                              apptype:=app_cui
+                          end
+                        else
+                          IllegalPara(opt);
+                      end;
                     'B':
                       begin
                         {  -WB200000 means set trefered base address
@@ -1848,6 +1889,7 @@ begin
    def_system_macro(target_info.shortname)
   else
    undef_system_macro(target_info.shortname);
+
   s:=target_info.extradefines;
   while (s<>'') do
    begin
@@ -1860,6 +1902,74 @@ begin
       undef_system_macro(Copy(s,1,i-1));
      delete(s,1,i);
    end;
+
+  { endian define }
+  case target_info.endian of
+    endian_little :
+      begin
+         if def then
+           begin
+             def_system_macro('ENDIAN_LITTLE');
+             def_system_macro('FPC_LITTLE_ENDIAN');
+           end
+         else
+           begin
+             undef_system_macro('ENDIAN_LITTLE');
+             undef_system_macro('FPC_LITTLE_ENDIAN');
+           end;
+      end;
+    endian_big :
+      begin
+         if def then
+           begin
+             def_system_macro('ENDIAN_BIG');
+             def_system_macro('FPC_BIG_ENDIAN');
+           end
+         else
+           begin
+             undef_system_macro('ENDIAN_BIG');
+             undef_system_macro('FPC_BIG_ENDIAN');
+           end
+      end;
+  end;
+
+  { abi define }
+  case target_info.abi of
+    abi_powerpc_sysv :
+      if def then
+        def_system_macro('FPC_ABI_SYSV')
+      else
+        undef_system_macro('FPC_ABI_SYSV');
+    abi_powerpc_aix :
+      if def then
+        def_system_macro('FPC_ABI_AIX')
+      else
+        undef_system_macro('FPC_ABI_AIX');
+  end;
+
+  if (tf_winlikewidestring in target_info.flags) then
+    if def then
+      def_system_macro('FPC_WINLIKEWIDESTRING')
+    else
+      undef_system_macro('FPC_WINLIKEWIDESTRING');
+
+  if (tf_requires_proper_alignment in target_info.flags) then
+    if def then
+      def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT')
+    else
+      undef_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
+
+  if source_info.system<>target_info.system then
+    if def then
+      def_system_macro('FPC_CROSSCOMPILING')
+    else
+      undef_system_macro('FPC_CROSSCOMPILING');
+
+  if source_info.cpu<>target_info.cpu then
+    if def then
+      def_system_macro('FPC_CPUCROSSCOMPILING')
+    else
+      def_system_macro('FPC_CPUCROSSCOMPILING');
 end;
 
 
@@ -1874,6 +1984,7 @@ begin
   ParaObjectPath:=TSearchPathList.Create;
   ParaUnitPath:=TSearchPathList.Create;
   ParaLibraryPath:=TSearchPathList.Create;
+  ParaFrameworkPath:=TSearchPathList.Create;
   FillChar(ParaAlignment,sizeof(ParaAlignment),0);
 end;
 
@@ -1884,6 +1995,7 @@ begin
   ParaObjectPath.Free;
   ParaUnitPath.Free;
   ParaLibraryPath.Free;
+  ParaFrameworkPath.Free;
 end;
 
 
@@ -1950,6 +2062,9 @@ begin
   option:=coption.create;
   disable_configfile:=false;
 
+  { Non-core target defines }
+  Option.TargetDefines(true);
+
 { get default messagefile }
   msgfilename:=GetEnvironmentVariable('PPC_ERROR_FILE');
 
@@ -2122,16 +2237,6 @@ begin
   def_system_macro('FPC_REQUIRES_PROPER_ALIGNMENT');
 {$endif arm}
 
-  if source_info.system<>target_info.system then
-    def_system_macro('FPC_CROSSCOMPILING');
-
-  if source_info.cpu<>target_info.cpu then
-    def_system_macro('FPC_CPUCROSSCOMPILING');
-
-  if tf_winlikewidestring in target_info.flags then
-    def_system_macro('FPC_WINLIKEWIDESTRING');
-
-  { read configuration file }
   if (not disable_configfile) and
      (ppccfg<>'') then
     begin
@@ -2172,31 +2277,6 @@ begin
   if option.ParaLogo then
     option.writelogo;
 
-  { Non-core target defines }
-  Option.TargetDefines(true);
-
-  { endian define }
-  case target_info.endian of
-    endian_little :
-      begin
-         def_system_macro('ENDIAN_LITTLE');
-         def_system_macro('FPC_LITTLE_ENDIAN');
-      end;
-    endian_big :
-      begin
-         def_system_macro('ENDIAN_BIG');
-         def_system_macro('FPC_BIG_ENDIAN');
-      end;
-  end;
-
-  { abi define }
-  case target_info.abi of
-    abi_powerpc_sysv :
-      def_system_macro('FPC_ABI_SYSV');
-    abi_powerpc_aix :
-      def_system_macro('FPC_ABI_AIX');
-  end;
-
 { Check file to compile }
   if param_file='' then
    begin
@@ -2233,6 +2313,7 @@ begin
   ObjectSearchPath.AddList(option.ParaObjectPath,true);
   IncludeSearchPath.AddList(option.ParaIncludePath,true);
   LibrarySearchPath.AddList(option.ParaLibraryPath,true);
+  FrameworkSearchPath.AddList(option.ParaFrameworkPath,true);
 
   { add unit environment and exepath to the unit search path }
   if inputfilepath<>'' then

+ 1 - 1
compiler/opttail.pas

@@ -194,7 +194,7 @@ unit opttail;
                vardef.needs_inittable) then
                exit;
 
-        labelnode:=clabelnode.create(cnothingnode.create);
+        labelnode:=clabelnode.create(cnothingnode.create,nil);
         if find_and_replace_tailcalls(n) then
           begin
             oldnodes:=n;

+ 11 - 4
compiler/optunrol.pas

@@ -36,7 +36,7 @@ unit optunrol;
       globtype,globals,
       cpuinfo,
       nutils,
-      nbas,nflw,ncon,ninl,ncal;
+      nbas,nflw,ncon,ninl,ncal,nld;
 
     var
       nodecount : aint;
@@ -76,7 +76,7 @@ unit optunrol;
       var
         unrolls,i : integer;
         counts : qword;
-        unrollstatement : tstatementnode;
+        unrollstatement,newforstatement : tstatementnode;
         unrollblock : tblocknode;
       begin
         result:=nil;
@@ -112,7 +112,7 @@ unit optunrol;
                     if (counts mod unrolls<>0) and
                       ((counts mod unrolls)=unrolls-i) then
                       begin
-                        tfornode(node).entrylabel:=clabelnode.create(cnothingnode.create);
+                        tfornode(node).entrylabel:=clabelnode.create(cnothingnode.create,nil);
                         addstatement(unrollstatement,tfornode(node).entrylabel);
                       end;
 
@@ -126,7 +126,14 @@ unit optunrol;
                   end;
                 { can we get rid of the for statement? }
                 if unrolls=counts then
-                  result:=unrollblock;
+                  begin
+                    { create block statement }
+                    result:=internalstatements(newforstatement);
+                    { initial assignment }
+                    addstatement(newforstatement,cassignmentnode.create(
+                      tfornode(node).left.getcopy,tfornode(node).right.getcopy));
+                    addstatement(newforstatement,unrollblock);
+                  end;
               end
             else
               begin

+ 11 - 2
compiler/pass_2.pas

@@ -58,6 +58,9 @@ implementation
 *****************************************************************************}
 
 {$ifdef EXTDEBUG}
+     var
+       secondprefix : string;
+
      procedure logsecond(ht:tnodetype; entry: boolean);
        const
          secondnames: array[tnodetype] of string[13] =
@@ -140,9 +143,15 @@ implementation
         p: pchar;
       begin
         if entry then
-          p := strpnew('second '+secondnames[ht]+' (entry)')
+          begin
+            secondprefix:=secondprefix+' ';
+            p := strpnew(secondprefix+'second '+secondnames[ht]+' (entry)')
+          end
         else
-          p := strpnew('second '+secondnames[ht]+' (exit)');
+          begin
+            p := strpnew(secondprefix+'second '+secondnames[ht]+' (exit)');
+            delete(secondprefix,length(secondprefix),1);
+          end;
         current_asmdata.CurrAsmList.concat(tai_comment.create(p));
       end;
 {$endif EXTDEBUG}

+ 26 - 18
compiler/pdecsub.pas

@@ -720,22 +720,22 @@ implementation
               (ttypesym(srsym).typedef.typ=objectdef) then
             begin
               aclass:=tobjectdef(ttypesym(srsym).typedef);
-              aprocsym:=tprocsym(aclass.symtable.Find(sp));
-              { we solve this below }
-              if assigned(aprocsym) then
+              srsym:=tsym(aclass.symtable.Find(sp));
+              if assigned(srsym) then
                begin
-                 if aprocsym.typ<>procsym then
-                  begin
-                    {  we use a different error message for tp7 so it looks more compatible }
-                    if (m_fpc in current_settings.modeswitches) then
-                      Message1(parser_e_overloaded_no_procedure,aprocsym.realname)
-                    else
-                      Message(parser_e_methode_id_expected);
-                    { rename the name to an unique name to avoid an
-                      error when inserting the symbol in the symtable }
-                    orgsp:=orgsp+'$'+tostr(current_filepos.line);
-                    aprocsym:=nil;
-                  end;
+                 if srsym.typ=procsym then
+                   aprocsym:=tprocsym(srsym)
+                 else
+                   begin
+                     {  we use a different error message for tp7 so it looks more compatible }
+                     if (m_fpc in current_settings.modeswitches) then
+                       Message1(parser_e_overloaded_no_procedure,srsym.realname)
+                     else
+                       Message(parser_e_methode_id_expected);
+                     { rename the name to an unique name to avoid an
+                       error when inserting the symbol in the symtable }
+                     orgsp:=orgsp+'$'+tostr(current_filepos.line);
+                   end;
                end
               else
                begin
@@ -777,8 +777,9 @@ implementation
                  else
                    begin
                      { when the other symbol is a unit symbol then hide the unit
-                       symbol }
-                     if (srsym.typ=unitsym) then
+                       symbol, this is not supported in tp7 }
+                     if not(m_tp7 in current_settings.modeswitches) and
+                        (srsym.typ=unitsym) then
                       begin
                         HideSym(srsym);
                         searchagain:=true;
@@ -1044,7 +1045,14 @@ implementation
                end
               else
                begin
-                 Message(parser_e_overload_operator_failed);
+                 case token of
+                   _CARET:
+                     Message1(parser_e_overload_operator_failed,'**');
+                   _UNEQUAL:
+                     Message1(parser_e_overload_operator_failed,'=');
+                   else
+                     Message1(parser_e_overload_operator_failed,'');
+                 end;
                  { Use the dummy NOTOKEN that is also declared
                    for the overloaded_operator[] }
                  optoken:=NOTOKEN;

+ 15 - 15
compiler/pdecvar.pas

@@ -1348,21 +1348,21 @@ implementation
              }
              if (target_info.system in [system_powerpc_darwin, system_powerpc_macos]) and
                 is_first_field and
-                (symtablestack.top.symtabletype = recordsymtable) and
-                (trecordsymtable(symtablestack.top).usefieldalignment = -1) then
+                (symtablestack.top.symtabletype=recordsymtable) and
+                (trecordsymtable(symtablestack.top).usefieldalignment=C_alignment) then
                begin
-                 tempdef := hdef;
-                 while tempdef.typ = arraydef do
-                   tempdef := tarraydef(tempdef).elementdef;
-                 if tempdef.typ <> recorddef then
-                   maxpadalign := tempdef.alignment
+                 tempdef:=hdef;
+                 while tempdef.typ=arraydef do
+                   tempdef:=tarraydef(tempdef).elementdef;
+                 if tempdef.typ<>recorddef then
+                   maxpadalign:=tempdef.alignment
                  else
-                   maxpadalign := trecorddef(tempdef).padalignment;
+                   maxpadalign:=trecorddef(tempdef).padalignment;
 
-                 if (maxpadalign > 4) and
-                    (maxpadalign > trecordsymtable(symtablestack.top).padalignment) then
-                   trecordsymtable(symtablestack.top).padalignment := maxpadalign;
-                 is_first_field := false;
+                 if (maxpadalign>4) and
+                    (maxpadalign>trecordsymtable(symtablestack.top).padalignment) then
+                   trecordsymtable(symtablestack.top).padalignment:=maxpadalign;
+                 is_first_field:=false;
                end;
 {$endif powerpc}
 
@@ -1537,12 +1537,12 @@ implementation
               { parent inherits the alignment padding if the variant is the first "field" of the parent record/variant }
               if (target_info.system in [system_powerpc_darwin, system_powerpc_macos]) and
                  is_first_field and
-                 (recst.usefieldalignment = -1) and
-                 (maxpadalign > recst.padalignment) then
+                 (recst.usefieldalignment=C_alignment) and
+                 (maxpadalign>recst.padalignment) then
                 recst.padalignment:=maxpadalign;
 {$endif powerpc}
               { Align the offset where the union symtable is added }
-              if (recst.usefieldalignment=-1) then
+              if (recst.usefieldalignment=C_alignment) then
                 usedalign:=used_align(unionsymtable.recordalignment,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign)
               else
                 usedalign:=used_align(unionsymtable.recordalignment,current_settings.alignment.recordalignmin,current_settings.alignment.recordalignmax);

+ 5 - 3
compiler/pexpr.pas

@@ -1702,7 +1702,7 @@ implementation
                         if tlabelsym(srsym).defined then
                           Message(sym_e_label_already_defined);
                         tlabelsym(srsym).defined:=true;
-                        p1:=clabelnode.create(nil);
+                        p1:=clabelnode.create(nil,tlabelsym(srsym));
                         tlabelsym(srsym).code:=p1;
                       end;
                   end;
@@ -2463,9 +2463,11 @@ implementation
                 end;
                consume(_REALNUMBER);
 {$ifdef FPC_REAL2REAL_FIXED}
-               if (d = single(d)) then
+               if (current_settings.minfpconstprec=s32real) and
+                  (d = single(d)) then
                  p1:=crealconstnode.create(d,s32floattype)
-               else if (d = double(d)) then
+               else if (current_settings.minfpconstprec=s64real) and
+                       (d = double(d)) then
                  p1:=crealconstnode.create(d,s64floattype)
                else
 {$endif FPC_REAL2REAL_FIXED}

+ 3 - 0
compiler/pmodules.pas

@@ -774,6 +774,8 @@ implementation
             begin
               result:=create_main_proc(make_mangledname('',current_module.localsymtable,'finalize_implicit'),potype_unitfinalize,st);
               result.procdef.aliasnames.insert(make_mangledname('FINALIZE$',current_module.localsymtable,''));
+              if (not current_module.is_unit) then
+                result.procdef.aliasnames.insert('PASCALFINALIZE');
             end;
           else
             internalerror(200304253);
@@ -1354,6 +1356,7 @@ implementation
               { Parse the finalize }
               finalize_procinfo:=create_main_proc(make_mangledname('',current_module.localsymtable,'finalize'),potype_unitfinalize,current_module.localsymtable);
               finalize_procinfo.procdef.aliasnames.insert(make_mangledname('FINALIZE$',current_module.localsymtable,''));
+              finalize_procinfo.procdef.aliasnames.insert('PASCALFINALIZE');
               finalize_procinfo.parse_body;
            end
          else

+ 1 - 1
compiler/powerpc/agppcmpw.pas

@@ -74,7 +74,7 @@ interface
         'csect', {read only data}
         'csect', {bss} 'csect', '',
         'csect','csect','csect','csect',
-         '','','','','','','','','','','','',''
+         '','','','','','','','','','','','','',''
       );
 
     type

+ 5 - 2
compiler/pstatmnt.pas

@@ -424,7 +424,10 @@ implementation
          typecheckpass(hto);
          set_varstate(hto,vs_read,[vsf_must_be_valid]);
          typecheckpass(hloopvar);
-         set_varstate(hloopvar,vs_readwritten,[]);
+         { in two steps, because vs_readwritten may turn on vsf_must_be_valid }
+         { for some subnodes                                                  }
+         set_varstate(hloopvar,vs_written,[]);
+         set_varstate(hloopvar,vs_read,[vsf_must_be_valid]);
 
          { ... now the instruction block }
          hblock:=statement;
@@ -1039,7 +1042,7 @@ implementation
                    if tlabelsym(srsym).defined then
                     Message(sym_e_label_already_defined);
                    tlabelsym(srsym).defined:=true;
-                   p:=clabelnode.create(nil);
+                   p:=clabelnode.create(nil,tlabelsym(srsym));
                    tlabelsym(srsym).code:=p;
                  end
                 else

+ 2 - 2
compiler/psub.pas

@@ -152,9 +152,10 @@ implementation
 
     procedure check_finalize_locals(p:TObject;arg:pointer);
       begin
+        { include the result: it needs to be finalized in case an exception }
+        { occurs                                                            }
         if (tsym(p).typ=localvarsym) and
            (tlocalvarsym(p).refs>0) and
-           not(vo_is_funcret in tlocalvarsym(p).varoptions) and
            not(is_class(tlocalvarsym(p).vardef)) and
            tlocalvarsym(p).vardef.needs_inittable then
           include(current_procinfo.flags,pi_needs_implicit_finally);
@@ -775,7 +776,6 @@ implementation
                 in pstatment.pas (for cases not caught by the Delphi
                 exception below)
               - no exceptions are used
-              - no debug info
               - no pushes are used/esp modifications, could be:
                 * outgoing parameters on the stack
                 * incoming parameters on the stack

+ 17 - 8
compiler/ptconst.pas

@@ -169,10 +169,19 @@ implementation
     { this procedure reads typed constants }
     procedure read_typed_const_data(list:tasmlist;def:tdef);
 
-        procedure parse_orddef(list:tasmlist;def:torddef);
+      procedure parse_orddef(list:tasmlist;def:torddef);
         var
           n : tnode;
           intvalue : tconstexprint;
+
+        procedure do_error;
+          begin
+            if is_constnode(n) then
+              IncompatibleTypes(n.resultdef, def)
+            else
+              Message(parser_e_illegal_expression);
+          end;
+
         begin
            n:=comp_expr(true);
            case def.ordtype of
@@ -181,28 +190,28 @@ implementation
                    if is_constboolnode(n) then
                      list.concat(Tai_const.Create_8bit(byte(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               bool16bit :
                 begin
                    if is_constboolnode(n) then
                      list.concat(Tai_const.Create_16bit(word(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               bool32bit :
                 begin
                    if is_constboolnode(n) then
                      list.concat(Tai_const.Create_32bit(longint(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               bool64bit :
                 begin
                    if is_constboolnode(n) then
                      list.concat(Tai_const.Create_64bit(int64(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               uchar :
                 begin
@@ -212,7 +221,7 @@ implementation
                       (tordconstnode(n).value <= 255)) then
                      list.concat(Tai_const.Create_8bit(byte(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               uwidechar :
                 begin
@@ -221,7 +230,7 @@ implementation
                    if is_constwidecharnode(n) then
                      list.concat(Tai_const.Create_16bit(word(tordconstnode(n).value)))
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               s8bit,u8bit,
               u16bit,s16bit,
@@ -243,7 +252,7 @@ implementation
                        end;
                      end
                    else
-                     IncompatibleTypes(n.resultdef, def);
+                     do_error;
                 end;
               scurrency:
                 begin

+ 1 - 0
compiler/ptype.pas

@@ -446,6 +446,7 @@ implementation
                orddef :
                  begin
                    if (torddef(tt2).ordtype<>uvoid) and
+                      (torddef(tt2).ordtype<>uwidechar) and
                       (torddef(tt2).low>=0) then
                      // !! def:=tsetdef.create(tt2,torddef(tt2.def).low,torddef(tt2.def).high))
                      def:=tsetdef.create(tt2,torddef(tt2).high)

+ 9 - 2
compiler/raatt.pas

@@ -52,7 +52,7 @@ unit raatt;
         AS_DB,AS_DW,AS_DD,AS_DQ,AS_GLOBAL,
         AS_ALIGN,AS_BALIGN,AS_P2ALIGN,AS_ASCII,
         AS_ASCIIZ,AS_LCOMM,AS_COMM,AS_SINGLE,AS_DOUBLE,AS_EXTENDED,
-        AS_DATA,AS_TEXT,AS_INIT,AS_END,
+        AS_DATA,AS_TEXT,AS_INIT,AS_FINI,AS_END,
         {------------------ Assembler Operators  --------------------}
         AS_TYPE,AS_SIZEOF,AS_VMTOFFSET,AS_MOD,AS_SHL,AS_SHR,AS_NOT,AS_AND,AS_OR,AS_XOR,AS_NOR,AS_AT,
         AS_LO,AS_HI);
@@ -74,7 +74,7 @@ unit raatt;
         '.byte','.word','.long','.quad','.globl',
         '.align','.balign','.p2align','.ascii',
         '.asciz','.lcomm','.comm','.single','.double','.tfloat',
-        '.data','.text','.init','END',
+        '.data','.text','.init','.fini','END',
         'TYPE','SIZEOF','VMTOFFSET','%','<<','>>','!','&','|','^','~','@','lo','hi');
 
     type
@@ -987,6 +987,13 @@ unit raatt;
                Consume(AS_INIT);
              end;
 
+           AS_FINI:
+             Begin
+               new_section(curList,sec_fini,lower(current_procinfo.procdef.mangledname),0);
+               lasTSec:=sec_fini;
+               Consume(AS_FINI);
+             end;
+
            AS_DB:
              Begin
                Consume(AS_DB);

+ 51 - 3
compiler/scandir.pas

@@ -389,6 +389,23 @@ implementation
         def_system_macro('FPU'+fputypestr[current_settings.fputype]);
      end;
 
+    procedure dir_frameworkpath;
+      begin
+        if not current_module.in_global then
+         Message(scan_w_switch_is_global)
+        else if not(target_info.system in systems_darwin) then
+          begin
+            Message(scan_w_frameworks_darwin_only);
+            current_scanner.skipspace;
+            current_scanner.readcomment
+          end
+        else
+          begin
+            current_scanner.skipspace;
+            current_module.localframeworksearchpath.AddPath(current_scanner.readcomment,false);
+          end;
+      end;
+
     procedure dir_goto;
       begin
         do_moduleswitch(cs_support_goto);
@@ -495,6 +512,25 @@ implementation
         current_module.linkotherofiles.add(s,link_always);
       end;
 
+    procedure dir_linkframework;
+      var
+        s : string;
+      begin
+        current_scanner.skipspace;
+        if scanner.c = '''' then
+          begin
+            s:= current_scanner.readquotedstring;
+            current_scanner.readcomment
+          end
+        else
+          s:= trimspace(current_scanner.readcomment);
+        s:=FixFileName(s);
+        if (target_info.system in systems_darwin) then
+          current_module.linkotherframeworks.add(s,link_always)
+        else
+          Message(scan_w_frameworks_darwin_only);
+      end;
+
     procedure dir_linklib;
       type
         tLinkMode=(lm_shared,lm_static);
@@ -788,6 +824,15 @@ implementation
          end;
       end;
 
+
+    procedure dir_minfpconstprec;
+      begin
+        current_scanner.skipspace;
+        if not SetMinFPConstPrec(current_scanner.readid,current_settings.minfpconstprec) then
+          Message1(scan_e_illegal_minfpconstprec, pattern);
+      end;
+
+
     procedure dir_packrecords;
       var
         hs : string;
@@ -851,10 +896,10 @@ implementation
     procedure dir_pic;
       begin
         { windows doesn't need/support pic }
-        if not(target_info.system in system_windows+system_wince) then
-          do_moduleswitch(cs_create_pic)
+        if tf_no_pic_supported in target_info.flags then
+          message(scan_w_pic_ignored)
         else
-          message(scan_w_pic_ignored);
+          do_moduleswitch(cs_create_pic);
       end;
 
     procedure dir_pop;
@@ -1258,6 +1303,7 @@ implementation
         AddDirective('EXTERNALSYM',directive_all, @dir_externalsym);
         AddDirective('FATAL',directive_all, @dir_fatal);
         AddDirective('FPUTYPE',directive_all, @dir_fputype);
+        AddDirective('FRAMEWORKPATH',directive_all, @dir_frameworkpath);
         AddDirective('GOTO',directive_all, @dir_goto);
         AddDirective('HINT',directive_all, @dir_hint);
         AddDirective('HINTS',directive_all, @dir_hints);
@@ -1273,6 +1319,7 @@ implementation
         AddDirective('LIBEXPORT',directive_mac, @dir_libexport);
         AddDirective('LIBRARYPATH',directive_all, @dir_librarypath);
         AddDirective('LINK',directive_all, @dir_link);
+        AddDirective('LINKFRAMEWORK',directive_all, @dir_linkframework);
         AddDirective('LINKLIB',directive_all, @dir_linklib);
         AddDirective('LOCALSYMBOLS',directive_all, @dir_localsymbols);
         AddDirective('LONGSTRINGS',directive_all, @dir_longstrings);
@@ -1283,6 +1330,7 @@ implementation
         AddDirective('MEMORY',directive_all, @dir_memory);
         AddDirective('MESSAGE',directive_all, @dir_message);
         AddDirective('MINENUMSIZE',directive_all, @dir_packenum);
+        AddDirective('MINFPCONSTPREC',directive_all, @dir_minfpconstprec);
         AddDirective('MINSTACKSIZE',directive_all, @dir_minstacksize);
         AddDirective('MMX',directive_all, @dir_mmx);
         AddDirective('MODE',directive_all, @dir_mode);

+ 1 - 1
compiler/scanner.pas

@@ -3498,7 +3498,7 @@ In case not, the value returned can be arbitrary.
                     readchar;
                     c:=upcase(c);
                     if (block_type in [bt_type,bt_specialize]) or
-                       (lasttoken=_ID) or (lasttoken=_NIL) or
+                       (lasttoken=_ID) or (lasttoken=_NIL) or (lasttoken=_OPERATOR) or
                        (lasttoken=_RKLAMMER) or (lasttoken=_RECKKLAMMER) or (lasttoken=_CARET) then
                      begin
                        token:=_CARET;

+ 4 - 0
compiler/script.pas

@@ -378,7 +378,11 @@ Procedure TAsmScriptUnix.AddLinkCommand (Const Command, Options, FileName : TCmd
 begin
   if FileName<>'' then
    Add('echo Linking '+ScriptFixFileName(FileName));
+  Add('OFS=$IFS');
+  Add('IFS="');
+  Add('"');
   Add(maybequoted(command)+' '+Options);
+  Add('IFS=$OFS');
   Add('if [ $? != 0 ]; then DoExitLink '+ScriptFixFileName(FileName)+'; fi');
 end;
 

+ 0 - 6
compiler/symconst.pas

@@ -181,12 +181,6 @@ type
     uchar,uwidechar,scurrency
   );
 
-  { float types }
-  tfloattype = (
-    s32real,s64real,s80real,
-    s64comp,s64currency,s128real
-  );
-
   { string types }
   tstringtype = (
     st_shortstring,

+ 2 - 2
compiler/symdef.pas

@@ -767,7 +767,7 @@ implementation
            newlen:=length(s);
            { Replace with CRC if the parameter line is very long }
            if (newlen-oldlen>12) and
-              ((newlen>128) or (newlen-oldlen>64)) then
+              ((newlen+length(prefix)>128) or (newlen-oldlen>32)) then
              begin
                crc:=$ffffffff;
                for i:=0 to tprocdef(st.defowner).paras.count-1 do
@@ -2157,7 +2157,7 @@ implementation
     constructor tarraydef.create_from_pointer(def:tdef);
       begin
          { use -1 so that the elecount will not overflow }
-         self.create(0,high(aint-1),s32inttype);
+         self.create(0,high(aint)-1,s32inttype);
          arrayoptions:=[ado_IsConvertedPointer];
          setelementdef(def);
       end;

+ 10 - 13
compiler/symtable.pas

@@ -1038,9 +1038,10 @@ implementation
          if not assigned(defowner) then
            internalerror(200602061);
 
-         { check for duplicate field, parameter or local names
-           also in inherited classes }
-         if (sym.typ in [fieldvarsym,paravarsym,localvarsym]) and
+         { procsym and propertysym have special code
+           to override values in inherited classes. For other
+           symbols check for duplicates }
+         if not(sym.typ in [procsym,propertysym]) and
             (
              not(m_delphi in current_settings.modeswitches) or
              is_object(tdef(defowner))
@@ -1057,8 +1058,7 @@ implementation
            end
          else
            begin
-             if not(m_duplicate_names in current_settings.modeswitches) or
-                not(sym.typ in [paravarsym,localvarsym]) then
+             if not(m_duplicate_names in current_settings.modeswitches) then
                result:=inherited checkduplicate(hashedid,sym);
            end;
       end;
@@ -1168,10 +1168,7 @@ implementation
         if not is_funcret_sym(sym) and
            (defowner.typ=procdef) and
            assigned(tprocdef(defowner)._class) and
-           (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) and
-           { delphi allows local typed consts. having the same name as class members, probably
-             a delphi bug, but some delphi code depends on it }
-           not((m_duplicate_names in current_settings.modeswitches) and (sym.typ=staticvarsym)) then
+           (tprocdef(defowner).owner.defowner=tprocdef(defowner)._class) then
           result:=tprocdef(defowner)._class.symtable.checkduplicate(hashedid,sym);
       end;
 
@@ -1258,10 +1255,10 @@ implementation
         hsym:=tsym(FindWithHash(hashedid));
         if assigned(hsym) then
           begin
-            { Delphi you can have a symbol with the same name as the
+            { Delphi (contrary to TP) you can have a symbol with the same name as the
               unit, the unit can then not be accessed anymore using
               <unit>.<id>, so we can hide the symbol }
-            if (m_duplicate_names in current_settings.modeswitches) and
+            if (m_delphi in current_settings.modeswitches) and
                (hsym.typ=symconst.unitsym) then
               HideSym(hsym)
             else
@@ -1312,10 +1309,10 @@ implementation
         hsym:=tsym(FindWithHash(hashedid));
         if assigned(hsym) then
           begin
-            { Delphi you can have a symbol with the same name as the
+            { Delphi (contrary to TP) you can have a symbol with the same name as the
               unit, the unit can then not be accessed anymore using
               <unit>.<id>, so we can hide the symbol }
-            if (m_duplicate_names in current_settings.modeswitches) and
+            if (m_delphi in current_settings.modeswitches) and
                (hsym.typ=symconst.unitsym) then
               HideSym(hsym)
             else

+ 4 - 2
compiler/systems.pas

@@ -6,7 +6,7 @@
 
     This program is free software; you can redistribute it and/or modify
     iu under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 3 of the License, or
+    the Free Software Foundation; either version 2 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
@@ -307,7 +307,9 @@ interface
             tf_use_function_relative_addresses,
             tf_winlikewidestring,
             tf_dwarf_relative_addresses,         // use offsets where the Dwarf spec requires this instead of absolute addresses (the latter is needed by Linux binutils)
-            tf_dwarf_only_local_labels           // only use local labels inside the Dwarf debug_info section (needed for e.g. Darwin)
+            tf_dwarf_only_local_labels,          // only use local labels inside the Dwarf debug_info section (needed for e.g. Darwin)
+            tf_requires_proper_alignment,
+            tf_no_pic_supported
        );
 
        psysteminfo = ^tsysteminfo;

+ 7 - 4
compiler/systems/i_win.pas

@@ -33,7 +33,7 @@ unit i_win;
             name         : 'Win32 for i386';
             shortname    : 'Win32';
             flags        : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses
-                            ,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},tf_winlikewidestring];
+                            ,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},tf_winlikewidestring,tf_no_pic_supported];
             cpu          : cpu_i386;
             unit_env     : 'WIN32UNITS';
             extradefines : 'MSWINDOWS;WINDOWS';
@@ -92,7 +92,8 @@ unit i_win;
             system       : system_x86_64_win64;
             name         : 'Win64 for x64';
             shortname    : 'Win64';
-            flags        : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,tf_winlikewidestring];
+            flags        : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,
+                            tf_winlikewidestring,tf_no_pic_supported];
             cpu          : cpu_x86_64;
             unit_env     : 'WIN64UNITS';
             extradefines : 'MSWINDOWS;WINDOWS';
@@ -151,7 +152,8 @@ unit i_win;
             system       : system_arm_wince;
             name         : 'WinCE for ARM';
             shortname    : 'WinCE';
-            flags        : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},tf_smartlink_sections];
+            flags        : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},
+                            tf_smartlink_sections,tf_requires_proper_alignment,tf_no_pic_supported];
             cpu          : cpu_arm;
             unit_env     : '';
             extradefines : 'UNDER_CE;WINDOWS;UNICODE';
@@ -210,7 +212,8 @@ unit i_win;
             system       : system_i386_wince;
             name         : 'WinCE for i386';
             shortname    : 'WinCE';
-            flags        : [tf_files_case_aware,tf_use_function_relative_addresses{,tf_winlikewidestring},tf_smartlink_sections];
+            flags        : [tf_files_case_aware,tf_use_function_relative_addresses
+                            {,tf_winlikewidestring},tf_smartlink_sections,tf_no_pic_supported];
             cpu          : cpu_i386;
             unit_env     : '';
             extradefines : 'UNDER_CE;WINDOWS;UNICODE';

+ 8 - 5
compiler/systems/t_beos.pas

@@ -247,19 +247,22 @@ begin
   else
    LinkRes.Add('ld -o $1 -e 0 $2 $3 $4 $5 $6 $7 $8 $9\');
   }
-  LinkRes.Add('-m elf_i386_be -shared -Bsymbolic');
+  LinkRes.Add('-m');
+  LinkRes.Add('elf_i386_be');
+  LinkRes.Add('-shared');
+  LinkRes.Add('-Bsymbolic');
 
   { Write path to search libraries }
   HPath:=TCmdStrListItem(current_module.locallibrarysearchpath.First);
   while assigned(HPath) do
    begin
-     LinkRes.Add(maybequoted('-L'+HPath.Str));
+     LinkRes.Add('-L'+HPath.Str);
      HPath:=TCmdStrListItem(HPath.Next);
    end;
   HPath:=TCmdStrListItem(LibrarySearchPath.First);
   while assigned(HPath) do
    begin
-     LinkRes.Add(maybequoted('-L'+HPath.Str));
+     LinkRes.Add('-L'+HPath.Str);
      HPath:=TCmdStrListItem(HPath.Next);
    end;
 
@@ -293,7 +296,7 @@ begin
    begin
      s:=ObjectFiles.GetFirst;
      if s<>'' then
-      LinkRes.AddFileName(maybequoted(s));
+      LinkRes.AddFileName(s);
    end;
 
 {  LinkRes.Add('-lroot \');
@@ -306,7 +309,7 @@ begin
      While not StaticLibFiles.Empty do
       begin
         S:=StaticLibFiles.GetFirst;
-        LinkRes.AddFileName(maybequoted(s))
+        LinkRes.AddFileName(s)
       end;
    end;
 

+ 67 - 13
compiler/systems/t_bsd.pas

@@ -234,7 +234,10 @@ begin
          else
            begin
              ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE `cat $RES`';
-             DllCmd[1]:='libtool $OPT -dynamic -multiply_defined suppress  -L. -o $EXE `cat $RES`'
+             if (apptype<>app_bundle) then
+               DllCmd[1]:='libtool $OPT -dynamic -multiply_defined suppress -L. -o $EXE `cat $RES`'
+             else
+               DllCmd[1]:='ld $OPT -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
            end
        end
      else
@@ -354,7 +357,15 @@ begin
           end
       else
         begin
-          prtobj:='';
+          if (apptype=app_bundle) then
+            begin
+              if librarysearchpath.FindFile('bundle1.o',false,s) then
+                prtobj:=s
+              else
+                prtobj:='/usr/lib/bundle1.o'
+            end
+          else
+            prtobj:=''
         end;
     end;
 
@@ -364,13 +375,22 @@ begin
   { Open link.res file }
   LinkRes:=TLinkRes.Create(outputexedir+Info.ResName);
 
-  if (not isdll) then
+  if (not isdll) or
+     (apptype=app_bundle) then
     begin
-      case target_info.system of
-        system_powerpc_darwin:
-           LinkRes.Add('-arch ppc');
-        system_i386_darwin:
-           LinkRes.Add('-arch i386');
+      if (target_info.system in systems_darwin) then
+        begin
+          LinkRes.Add('-arch');
+          case target_info.system of
+            system_powerpc_darwin:
+              LinkRes.Add('ppc');
+            system_i386_darwin:
+              LinkRes.Add('i386');
+            system_powerpc64_darwin:
+              LinkRes.Add('ppc64');
+            system_x86_64_darwin:
+              LinkRes.Add('x86_64');
+          end;
       end;
   end;
   { Write path to search libraries }
@@ -378,7 +398,7 @@ begin
   while assigned(HPath) do
    begin
      if LdSupportsNoResponseFile then
-       LinkRes.Add(maybequoted('-L'+HPath.Str))
+       LinkRes.Add('-L'+HPath.Str)
      else
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
      HPath:=TCmdStrListItem(HPath.Next);
@@ -387,12 +407,28 @@ begin
   while assigned(HPath) do
    begin
      if LdSupportsNoResponseFile then
-       LinkRes.Add(maybequoted('-L'+HPath.Str))
+       LinkRes.Add('-L'+HPath.Str)
      else
        LinkRes.Add('SEARCH_DIR('+maybequoted(HPath.Str)+')');
      HPath:=TCmdStrListItem(HPath.Next);
    end;
 
+  if (target_info.system in systems_darwin) then
+    begin
+      HPath:=TCmdStrListItem(current_module.localframeworksearchpath.First);
+      while assigned(HPath) do
+       begin
+         LinkRes.Add('-F'+HPath.Str);
+         HPath:=TCmdStrListItem(HPath.Next);
+       end;
+      HPath:=TCmdStrListItem(FrameworkSearchPath.First);
+      while assigned(HPath) do
+       begin
+         LinkRes.Add('-F'+HPath.Str);
+         HPath:=TCmdStrListItem(HPath.Next);
+       end;
+    end;
+
   if not LdSupportsNoResponseFile then
     LinkRes.Add('INPUT(');
   { add objectfiles, start with prt0 always }
@@ -412,7 +448,10 @@ begin
    begin
      s:=ObjectFiles.GetFirst;
      if s<>'' then
-      LinkRes.AddFileName(maybequoted(s));
+      if LdSupportsNoResponseFile then
+        LinkRes.AddFileName(s)
+      else
+        LinkRes.AddFileName(maybequoted(s));
    end;
   if not LdSupportsNoResponseFile then
    LinkRes.Add(')');
@@ -425,7 +464,10 @@ begin
      While not StaticLibFiles.Empty do
       begin
         S:=StaticLibFiles.GetFirst;
-        LinkRes.AddFileName(maybequoted(s))
+        if LdSupportsNoResponseFile then
+          LinkRes.AddFileName(s)
+        else
+          LinkRes.AddFileName(maybequoted(s))
       end;
      if not LdSupportsNoResponseFile then
        LinkRes.Add(')');
@@ -471,6 +513,15 @@ begin
      if not LdSupportsNoResponseFile then
        LinkRes.Add(')');
    end;
+   
+  { frameworks for Darwin }
+  if IsDarwin then
+    while not FrameworkFiles.empty do
+      begin
+        LinkRes.Add('-framework');
+        LinkRes.Add(FrameworkFiles.GetFirst);
+      end;
+     
   { objects which must be at the end }
   if linklibc and
      not IsDarwin Then
@@ -490,7 +541,10 @@ begin
   { ignore the fact that our relocations are in non-writable sections, }
   { will be fixed once we have pic support                             }
   if isdll and IsDarwin Then
-    LinkRes.Add('-read_only_relocs suppress');
+    begin
+      LinkRes.Add('-read_only_relocs');
+      LinkRes.Add('suppress');
+    end;
 { Write and Close response }
   linkres.writetodisk;
   linkres.Free;

+ 4 - 4
compiler/utils/msgdif.pp

@@ -352,7 +352,7 @@ type TArgSet = set of 0..31;
 
 function MsgToSet(const Msg, FileName: string; var R: TArgSet): Boolean;
   var
-    i, j, num : integer;
+    i, j,l, num : integer;
     code : word;
   begin
     R:=[];
@@ -360,9 +360,9 @@ function MsgToSet(const Msg, FileName: string; var R: TArgSet): Boolean;
     for i:=1 to Length(Msg) do
       if Msg[i]='$' then
       begin
-        j:=i+1;
-        while Msg[j] in ['0'..'9'] do Inc(j);
-        if j > i+1 then
+        j:=i+1; l:=length(msg)+1;
+        while (j<l) and (Msg[j] in ['0'..'9']) do Inc(j);
+        if j = l then
         begin
           val(copy(Msg,i+1,j-i-1),num,code);
           if num > high(TArgSet) then begin

+ 22 - 3
compiler/widestr.pas

@@ -55,6 +55,7 @@ unit widestr;
     function unicode2asciichar(c : tcompilerwidechar) : char;
     procedure ascii2unicode(p : pchar;l : SizeInt;r : pcompilerwidestring);
     procedure unicode2ascii(r : pcompilerwidestring;p : pchar);
+    function hasnonasciichars(const p: pcompilerwidestring): boolean;
     function getcharwidestring(r : pcompilerwidestring;l : SizeInt) : tcompilerwidechar;
     function cpavailable(const s : string) : boolean;
 
@@ -166,10 +167,11 @@ unit widestr;
       end;
 
     function unicode2asciichar(c : tcompilerwidechar) : char;
-
       begin
-{$warning TODO unicode2asciichar}
-        unicode2asciichar:=#0;
+        if word(c)<128 then
+          unicode2asciichar:=char(word(c))
+         else
+          unicode2asciichar:='?';
       end;
 
     procedure ascii2unicode(p : pchar;l : SizeInt;r : pcompilerwidestring);
@@ -242,6 +244,23 @@ unit widestr;
       end;
 
 
+    function hasnonasciichars(const p: pcompilerwidestring): boolean;
+      var
+        source : tcompilerwidecharptr;
+        i      : longint;
+      begin
+        source:=tcompilerwidecharptr(p^.data);
+        result:=true;
+        for i:=1 to p^.len do
+          begin
+            if word(source^)>=128 then
+              exit;
+            inc(source);
+          end;
+        result:=false;
+      end;
+
+
     function cpavailable(const s : string) : boolean;
       begin
           cpavailable:=mappingavailable(s);

+ 2 - 0
compiler/x86/agx86int.pas

@@ -67,6 +67,7 @@ implementation
         '','','','',
         '',
         '',
+        '',
         ''
       );
 
@@ -78,6 +79,7 @@ implementation
         '','','','',
         '',
         '',
+        '',
         ''
       );
 

+ 1 - 1
compiler/x86/nx86inl.pas

@@ -62,7 +62,7 @@ implementation
 
     uses
       systems,
-      globals,
+      globtype,globals,
       cutils,verbose,
       symconst,
       defutil,

+ 20 - 17
compiler/x86/rax86att.pas

@@ -573,23 +573,26 @@ Implementation
                         end;
                      end;
                   end;
-                  if actasmtoken=AS_DOT then
-                    MaybeRecordOffset;
-                  { add a constant expression? }
-                  if (actasmtoken=AS_PLUS) then
-                   begin
-                     l:=BuildConstExpression(true,false);
-                     case oper.opr.typ of
-                       OPR_CONSTANT :
-                         inc(oper.opr.val,l);
-                       OPR_LOCAL :
-                         inc(oper.opr.localsymofs,l);
-                       OPR_REFERENCE :
-                         inc(oper.opr.ref.offset,l);
-                       else
-                         internalerror(200309202);
-                     end;
-                   end
+                  if oper.opr.typ<>OPR_NONE Then
+                    begin
+                      if (actasmtoken=AS_DOT) then
+                        MaybeRecordOffset;
+                      { add a constant expression? }
+                      if (actasmtoken=AS_PLUS) then
+                        begin
+                          l:=BuildConstExpression(true,false);
+                          case oper.opr.typ of
+                            OPR_CONSTANT :
+                              inc(oper.opr.val,l);
+                            OPR_LOCAL :
+                              inc(oper.opr.localsymofs,l);
+                            OPR_REFERENCE :
+                              inc(oper.opr.ref.offset,l);
+                            else
+                              internalerror(200309202);
+                          end;
+                        end;
+                    end;
                end;
               { Do we have a indexing reference, then parse it also }
               if actasmtoken=AS_LPAREN then

+ 2 - 2
compiler/x86/x86ins.dat

@@ -1721,7 +1721,7 @@ xmmreg,xmmreg         \323\3\x66\x0F\xEF\110          WILLAMETTE,SSE2
 (Ch_Mop2, Ch_Rop1, Ch_RWFlags)
 rm16|32|64,unity      \300\320\1\xD1\202              8086
 rm16|32|64,reg_cl     \300\320\1\xD3\202              8086
-rm16|32|64,imm8       \300\320\1\xC1\202\25           8086
+rm16|32|64,imm        \300\320\1\xC1\202\25           8086,SB
 rm8,unity             \300\323\1\xD0\202              8086
 rm8,reg_cl            \300\323\1\xD2\202              8086
 rm8,imm               \300\323\1\xC0\202\25           186,SB
@@ -1730,7 +1730,7 @@ rm8,imm               \300\323\1\xC0\202\25           186,SB
 (Ch_Mop2, Ch_Rop1, Ch_RWFlags)
 rm16|32|64,unity      \300\320\1\xD1\203              8086
 rm16|32|64,reg_cl     \300\320\1\xD3\203              8086
-rm16|32|64,imm8       \300\320\1\xC1\203\25           8086
+rm16|32|64,imm        \300\320\1\xC1\203\25           8086,SB
 rm8,unity             \300\323\1\xD0\203              8086
 rm8,reg_cl            \300\323\1\xD2\203              8086
 rm8,imm               \300\323\1\xC0\203\25           186,SB

+ 4 - 4
compiler/x86_64/x8664tab.inc

@@ -5407,9 +5407,9 @@
   (
     opcode  : A_RCL;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#130#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCL;
@@ -5449,9 +5449,9 @@
   (
     opcode  : A_RCR;
     ops     : 2;
-    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate or ot_bits8,ot_none);
+    optypes : (ot_regmem or ot_bits16 or ot_bits32 or ot_bits64,ot_immediate,ot_none);
     code    : #192#208#1#193#131#21;
-    flags   : if_8086
+    flags   : if_8086 or if_sb
   ),
   (
     opcode  : A_RCR;

+ 4 - 4
ide/whlpview.pas

@@ -102,7 +102,7 @@ type
       PLinePosCollection = ^TLinePosCollection;
       TLinePosCollection = object(TNoDisposeCollection)
         function At(Index: sw_Integer): sw_integer;
-        procedure Insert (Item: ptrint);virtual;
+        procedure Insert (Item: pointer);virtual;
       end;
 
       PHelpTopic = ^THelpTopic;
@@ -402,9 +402,9 @@ begin
   at := longint (inherited at(Index));
 end;
 
-procedure TLinePosCollection.Insert (Item: ptrint);
+procedure TLinePosCollection.Insert (Item: pointer);
 begin
-  Inherited Insert(pointer(Item));
+  Inherited Insert(Item);
 end;
 
 constructor THelpTopic.Init(ATopic: PTopic);
@@ -482,7 +482,7 @@ begin
       Bounds.Move(Delta,0);
   if Line='' then Line:=' ';
   Lines^.Insert(NewStr(Line));
-  LinesPos^.Insert(LinePos);
+  LinesPos^.Insert(pointer(LinePos));
   ClearLine;
   LineStart:=NextLineStart;
   CurPos.X:=Margin+LineStart; Line:=CharStr(#255,LineStart); Inc(CurPos.Y);

+ 3 - 1
tests/tbs/tb0474.pp → tests/tbf/tb0201.pp

@@ -1,4 +1,6 @@
-{ $mode objfpc}
+{ %fail }
+
+{$mode delphi}
 const
   WideNull = widechar(#0);
   WideSpace = widechar(#32);

+ 8 - 0
tests/tbf/tb0202.pp

@@ -0,0 +1,8 @@
+{ %fail }
+
+{$mode delphi}
+
+var
+  s: set of widechar;
+begin
+end.

+ 13 - 0
tests/tbs/tb0542.pp

@@ -0,0 +1,13 @@
+{ %norun }
+{ %opt=-Sew }
+
+procedure t;
+var
+  f:array[1..10] of text;
+begin
+  assign(f[1],paramstr(0));
+end;
+
+begin
+  t;
+end.

+ 13 - 0
tests/test/tfwork1.pp

@@ -0,0 +1,13 @@
+{ %target=darwin }
+{ %cpu=i386,powerpc }
+
+{$linkframework Carbon}
+
+type
+  CFStringRef = pointer;
+
+function CFSTR( c: PChar ): CFStringRef; external name '___CFStringMakeConstantString'; mwpascal;
+
+begin
+  CFSTR('hello');  
+end.

+ 16 - 0
tests/test/tfwork2.pp

@@ -0,0 +1,16 @@
+{ %target=linux,solaris,freebsd,win32 }
+{ %fail }
+{ %opt=-Sew }
+
+{ just some random non-darwin targets }
+
+{$linkframework Carbon}
+
+type
+  CFStringRef = pointer;
+
+function CFSTR( c: PChar ): CFStringRef; external name '___CFStringMakeConstantString'; mwpascal;
+
+begin
+  CFSTR('hello');  
+end.

+ 0 - 14
tests/webtbf/tw3183b.pp

@@ -1,14 +0,0 @@
-{ %fail }
-{$mode objfpc}
-
-type
-  ta = interface
-    function a: longint;
-  end;
-
-  tb = interface(ta)
-    function a: ansistring;
-  end;
-
-begin
-end.

+ 19 - 0
tests/webtbf/tw6957.pp

@@ -0,0 +1,19 @@
+{ %fail }
+
+{$IFDEF FPC}
+ {$MODE TP}
+{$ENDIF FPC}
+unit tw6957;
+
+interface
+
+function tw6957: boolean;
+
+implementation
+
+function tw6957: boolean;
+begin
+ tw6957 := true;
+end;
+
+end.

+ 21 - 0
tests/webtbf/tw9306c.pp

@@ -0,0 +1,21 @@
+{ %fail }
+
+type
+  tobj = object
+    function f: integer; virtual;
+  end;
+
+  tobj2 = object(tobj)
+    function f: string; virtual;
+  end;
+
+  function tobj.f: integer;
+    begin
+    end;
+
+  function tobj2.f:string;
+    begin
+    end;
+
+begin
+end.

+ 9 - 0
tests/webtbf/tw9499.pp

@@ -0,0 +1,9 @@
+{ %fail }
+
+program Project1;
+
+var
+  i: Longint;
+begin
+  i := 2 div 0;
+end.

+ 10 - 0
tests/webtbf/tw9499a.pp

@@ -0,0 +1,10 @@
+{ %fail }
+
+program Project1;
+
+var
+  i: Longint;
+begin
+  i := 2;
+  i := i div 0;
+end.

+ 7 - 0
tests/webtbf/tw9579a.pp

@@ -0,0 +1,7 @@
+{ %fail }
+
+var
+ s: ansistring;
+begin
+  writeln(high(ansistring));
+end.

+ 7 - 0
tests/webtbf/tw9579b.pp

@@ -0,0 +1,7 @@
+{ %fail }
+
+var
+ s: widestring;
+begin
+  writeln(high(ansistring));
+end.

+ 2 - 0
tests/webtbs/tw4254.pp

@@ -1,3 +1,5 @@
+{$codepage utf8}
+
 { Source provided for Free Pascal Bug Report 4254 }
 { Submitted by "rimga" on  2005-08-04 }
 { e-mail: [email protected] }

+ 18 - 0
tests/webtbs/tw6525.pp

@@ -0,0 +1,18 @@
+{ %cpu=i386,x86_64 }
+
+label l1;
+var
+  err : boolean;
+begin
+  asm
+   jmp l1
+  end;
+  writeln('oops');
+  err:=true;
+l1:
+  writeln('hello');
+  if err then
+    halt(1);
+end.
+
+

+ 27 - 0
tests/webtbs/tw8678.pp

@@ -0,0 +1,27 @@
+{ %cpu=powerpc,powerpc64,sparc,arm,x86_64 }
+
+var
+  l: longint;
+  s: single;
+  d: double;
+
+begin
+{$if not defined(cpux86_64) or defined(win64)} // or: using sse unit for math
+  l := maxlongint;
+{$MINFPCONSTPREC default}
+  s:= l / 1.0;
+  d:= l / 1.0;
+  if (s <> d) then
+    halt(1);
+{$MINFPCONSTPREC 32}
+  s:= l / 1.0;
+  d:= l / 1.0;
+  if (s <> d) then
+    halt(2);
+{$MINFPCONSTPREC 64}
+  s:= l / 1.0;
+  d:= l / 1.0;
+  if (s = d) then
+    halt(3);
+{$endif}
+end.

+ 17 - 0
tests/webtbs/tw8678a.pp

@@ -0,0 +1,17 @@
+{ %cpu=powerpc,powerpc64,sparc,arm,x86_64 }
+{ %opt=-CF64 }
+
+var
+  l: longint;
+  s: single;
+  d: double;
+
+begin
+{$if not defined(cpux86_64) or defined(win64)} // or: using sse unit for math
+  l := maxlongint;
+  s:= l / 1.0;
+  d:= l / 1.0;
+  if (s = d) then
+    halt(1);
+{$endif}
+end.

+ 11 - 0
tests/webtbs/tw9025.pp

@@ -0,0 +1,11 @@
+{ %cpu=i386,x86_64}
+{ %norun }
+
+{$asmmode intel}
+
+begin
+  asm
+    rcl ax,1
+    rcr ax,1
+  end
+end.

+ 28 - 0
tests/webtbs/tw9026.pp

@@ -0,0 +1,28 @@
+operator := (input:extended) output: string;
+begin
+   str(round(input),output);
+end;
+
+operator + (const s: string; input:extended) output: string;
+begin
+   str(round(input),output);
+   output:=s+output;
+end;
+
+procedure test(a:string);
+begin
+   writeln(a);
+   if (a <> 'help1') then
+     halt(1);
+end;
+
+var
+s: string;
+begin
+   s:='help';
+   test('help'+1);
+   test(s+1);
+   test(s+1.2);
+   test(s+extended(1.2));
+   test(s+string(1.2));
+end.

+ 15 - 0
tests/webtbs/tw9072.pp

@@ -0,0 +1,15 @@
+{ %opt=-Sew }
+
+{$mode tp}
+
+var
+  a: array[1..2] of longint;
+  l: longint;
+begin
+  l:=0;
+  for a[1]:=1 to 10 do
+    for a[2]:=1 to 10 do
+      inc(l);
+  if (l<>100) then
+    halt(1);
+end.

+ 12 - 0
tests/webtbs/tw9096.pp

@@ -0,0 +1,12 @@
+{ %OPT=-Ooloopunroll }
+var
+ arr : array[0..0,0..0] of longint;
+ i : longint;
+
+begin
+  i:=1234;
+  for i := 0 to 0 do
+    if i<>0 then
+      halt(1);
+  writeln('ok');
+end.

+ 23 - 0
tests/webtbs/tw9176a.pp

@@ -0,0 +1,23 @@
+{$mode delphi}
+
+type TBla=class
+     bla : integer;
+      procedure Bla;
+      procedure BlaBla;
+     end;
+
+procedure TBla.Bla;
+begin
+end;
+
+procedure TBla.BlaBla;
+ procedure Bla;
+ begin
+ end;
+begin
+ Bla;
+end;
+
+begin
+end.
+

+ 19 - 0
tests/webtbs/tw9299.pp

@@ -0,0 +1,19 @@
+{$mode objfpc}
+{$R+}
+
+function GetShiftedCard(const c: Cardinal): Cardinal;
+begin
+  Result := c shl 24;
+end;
+
+function GetShiftedByte(const c: Byte): Cardinal;
+begin
+  Result := c shl 24;
+end;
+
+begin
+  WriteLn(GetShiftedCard(200));
+
+  WriteLn(GetShiftedByte(200));
+
+end.

+ 63 - 0
tests/webtbs/tw9306a.pp

@@ -0,0 +1,63 @@
+{$mode objfpc}
+
+type
+  IIntf = interface
+    function Foo(const S: string): string;
+  end;
+
+  IIntf2 = interface(IIntf)
+    function Foo(const S: string): Integer;
+  end;
+
+  TIntf = class(TInterfacedObject, IIntf)
+  protected
+    { IIntf }
+    function Foo(const S: string): string;
+  end;
+
+  TIntf2 = class(TIntf, IIntf2)
+  public
+    { IIntf2 }
+    function Foo(const S: string): Integer; overload;
+  end;
+
+var
+  erridx : longint;
+
+{ TIntf }
+
+function TIntf.Foo(const S: string): string;
+begin
+  writeln('TIntf.Foo: ',S);
+  if erridx=0 then
+    erridx:=1;
+  result:=S;
+end;
+
+{ TIntf2 }
+
+function TIntf2.Foo(const S: string): Integer;
+begin
+  writeln('TIntf2.Foo: ',S);
+  if erridx=1 then
+    erridx:=2;
+  result:=0;
+end;
+
+var
+  i1 : IIntf;
+  i2 : IIntf2;
+begin
+  erridx:=0;
+
+  i1:=TIntf2.Create;
+  i1.Foo('1234');
+
+  i2:=TIntf2.Create;
+  i2.Foo('1234');
+  if erridx<>2 then
+    begin
+      writeln('Error');
+      halt(1);
+    end;
+end.

+ 63 - 0
tests/webtbs/tw9306b.pp

@@ -0,0 +1,63 @@
+{$mode delphi}
+
+type
+  IIntf = interface
+    function Foo(const S: string): string;
+  end;
+
+  IIntf2 = interface(IIntf)
+    function Foo(const S: string): Integer;
+  end;
+
+  TIntf = class(TInterfacedObject, IIntf)
+  protected
+    { IIntf }
+    function Foo(const S: string): string;
+  end;
+
+  TIntf2 = class(TIntf, IIntf2)
+  public
+    { IIntf2 }
+    function Foo(const S: string): Integer; overload;
+  end;
+
+var
+  erridx : longint;
+
+{ TIntf }
+
+function TIntf.Foo(const S: string): string;
+begin
+  writeln('TIntf.Foo: ',S);
+  if erridx=0 then
+    erridx:=1;
+  result:=S;
+end;
+
+{ TIntf2 }
+
+function TIntf2.Foo(const S: string): Integer;
+begin
+  writeln('TIntf2.Foo: ',S);
+  if erridx=1 then
+    erridx:=2;
+  result:=0;
+end;
+
+var
+  i1 : IIntf;
+  i2 : IIntf2;
+begin
+  erridx:=0;
+
+  i1:=TIntf2.Create;
+  i1.Foo('1234');
+
+  i2:=TIntf2.Create;
+  i2.Foo('1234');
+  if erridx<>2 then
+    begin
+      writeln('Error');
+      halt(1);
+    end;
+end.

+ 28 - 0
tests/webtbs/tw9385.pp

@@ -0,0 +1,28 @@
+{ %opt=-gh }
+
+program resultmemleak;
+
+{$ifdef FPC}{$mode objfpc}{$h+}{$INTERFACES CORBA}{$endif}
+{$ifdef mswindows}{$apptype console}{$endif}
+//compile with -gh
+uses
+ {$ifdef FPC}{$ifdef linux}cthreads,{$endif}{$endif}
+ sysutils;
+type
+ integerarty = array of integer;
+ 
+function testproc: integerarty;
+begin
+ setlength(result,100);
+ raise exception.create('');
+end;
+
+var
+ ar1: integerarty;
+begin
+ HaltOnNotReleased := true;
+ try
+  ar1:= testproc;
+ except
+ end;
+end.

+ 14 - 0
tests/webtbs/tw9704.pp

@@ -0,0 +1,14 @@
+program bug;
+
+{$H+}
+
+uses
+  SysUtils;
+
+function GetString: String;
+begin
+end;
+
+begin
+  WriteLn(Format('%s', [GetString()]));
+end.

Some files were not shown because too many files changed in this diff