Commit Graph

1058 Commits

Author SHA1 Message Date
nickysn
697f2fcf75 * prettify the "Use of -offset(%esp), access may cause a crash or value may be
lost" warning by showing the exact register used (esp or rsp) and using the
  asm syntax (Intel or AT&T) used originally in the code

git-svn-id: trunk@42211 -
2019-06-10 16:19:06 +00:00
nickysn
4f2ab3fb11 * prettify the "Use of -offset(%ebp) is not recommended for local variable
access" warning by showing the exact register used (bp, ebp or rbp) and using
  the original asm syntax

git-svn-id: trunk@42208 -
2019-06-10 15:26:46 +00:00
nickysn
1e07606cbf * prettify the "Use of +offset(%ebp) is not compatible with regcall convention"
and "Use of +offset(%ebp) for parameters invalid here" warning messages by
  showing the exact register used (bp, ebp or rbp) and using the original asm
  syntax (Intel: [EBP+offset]; AT&T: +offset(%ebp) )

git-svn-id: trunk@42207 -
2019-06-10 15:08:46 +00:00
Jonas Maebe
9a327f1fcd * ensure the LLVM-based compiler does not try to load units compiled with a
non-LLVM-base compiler and vice versa (caused internal errors, because
    the LLVM compiler uses different nodes, and these are saved in the PPUs
    for inline routines)

git-svn-id: branches/debug_eh@42196 -
2019-06-08 20:17:10 +00:00
Jonas Maebe
9e9a982bfe * synchronised with trunk till r42095
git-svn-id: branches/debug_eh@42096 -
2019-05-18 18:43:51 +00:00
Jonas Maebe
332679e28a * updated German message files (patch by Karl-Michael Schindler,
mantis #35559)

git-svn-id: trunk@42092 -
2019-05-18 12:29:35 +00:00
Jonas Maebe
1b6425176b * synchronised with trunk till r42049
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +00:00
Jonas Maebe
ba1b4b1c92 + support for verifying whether a case statements handles all possibilities
(based on patch by Martok)
   o enabled by default in ISO and Extended Pascal: compile-time error if not
     the case in ISO mode, warning and run-time error in Extended Pascal mode
   o warning enabled by default in all other modes for boolean, enumeration and
     subrange integer types with ranges different from the default ones
     (i.e., different from 0..255, -128..127, 0..65536, etc)
   o warnings for all ordinal types can be enabled in all modes with
     -CC

git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
Jonas Maebe
cd3e4d26d4 * recognise extra llvm/Xcode versions
git-svn-id: branches/debug_eh@41912 -
2019-04-20 18:56:19 +00:00
Jonas Maebe
46efaf4b2c + support for -CLflto_nosystem option to perform LTO for everything except
for the system unit, as there are several bugs in the Xcode linkers
    that trigger when the system unit is involved:
   o Xcode 9.3: the second symbol associated with routines that have multiple
     symbols (such as FPC_INTERLOCKED*) gets moved to the next routine (so
     e.g. calling InterlockedIncrement results in calling InterlockedExchange)
   o Xcode 10.1: the linker does not generate native code for the personality
     routine (probably because it's not referenced directly anywhere)

git-svn-id: branches/debug_eh@41911 -
2019-04-20 18:56:15 +00:00
Jonas Maebe
fc60ec2ea4 + support for LLVM LTO: compile units with -CLflto -> when compiling a main
program/library also with -Clflto, all units compiled with that option
    will be linked using their bitcode files and LTO
   o compiling with -CLflto will compile all units twice: once for normal
     (static or smart) linking, and once for LTO. So the result can be
     used both with and without LTO.

git-svn-id: branches/debug_eh@41910 -
2019-04-20 18:56:11 +00:00
Jonas Maebe
cf65c55b72 * support specifying the target LLVM/Xcode version
git-svn-id: branches/debug_eh@41727 -
2019-03-17 15:28:20 +00:00
Jonas Maebe
bc77aad3d9 * give an error when trying to call through to a C varargs routine with a
high level code generator
   o we cannot create a high-level stub in that case

git-svn-id: trunk@41443 -
2019-02-24 19:58:44 +00:00
Jonas Maebe
b2b34338e5 * give an error when trying to call an object instance method via a type node
(mantis #34821)

git-svn-id: trunk@40785 -
2019-01-06 15:21:36 +00:00
florian
10ab893de3 * improved explanation for warning 9034
git-svn-id: trunk@40749 -
2019-01-03 17:38:27 +00:00
svenbarth
425e9114f5 + add error message that a record or object type is required
git-svn-id: trunk@40654 -
2018-12-26 11:25:53 +00:00
marco
b60cbf3329 * systematically capitalize first word of errormsg/sentence, patch by J. Gareth Moreton, mantis 34618
git-svn-id: trunk@40422 -
2018-11-30 11:21:50 +00:00
yury
5c5dc2ed50 * Changed verbosity of ""???" not yet supported inside inline procedure/function" to note to be consistent with note "Call to subroutine "?" marked as inline is not inlined".
git-svn-id: trunk@40255 -
2018-11-07 12:57:23 +00:00
pierre
4c0a213f0d Add -Tlinux and -Tembedded help lines for riscv32 and riscv64 compilers
git-svn-id: trunk@39945 -
2018-10-16 10:41:27 +00:00
florian
a34d4e715c Merged riscv_new branch
git-svn-id: trunk@39813 -
2018-09-26 19:49:08 +00:00
florian
ee338fc709 * patch by Karl-Michael Schindler to update the german messages files, resolves #34218
git-svn-id: trunk@39760 -
2018-09-16 15:13:04 +00:00
svenbarth
cfe75ca0fd + add messages to use when generic types of a definition do not match with its declaration
git-svn-id: trunk@39700 -
2018-09-02 16:20:18 +00:00
florian
3c69f9a066 + basic infrastructure to generate code for floating point exception
checking for CPUs without floating point exception support

git-svn-id: branches/laksen/riscv_new@39637 -
2018-08-19 10:54:45 +00:00
tg74
867d145e50 support vector operand bcst,{sae},{er} + k-register
git-svn-id: branches/tg74/avx512@39457 -
2018-07-16 17:06:57 +00:00
florian
0eea2141f6 * patch by J. Gareth Moreton: clarity in directive conflict error messages, resolves #33754
git-svn-id: trunk@39407 -
2018-07-07 14:46:01 +00:00
svenbarth
0a45d7a774 + add a message that is used when a threadvar section is started inside a class or record without the "class"
specifier

git-svn-id: trunk@39286 -
2018-06-23 13:49:05 +00:00
svenbarth
7522a34a67 + add a message that can be used if an internal operator hides an existing operator overload
git-svn-id: trunk@39260 -
2018-06-20 19:53:50 +00:00
svenbarth
b7cc225149 * revert r39043 and r39045 which disallow static array constants inside dynamic constants for Delphi modes
git-svn-id: trunk@39078 -
2018-05-21 08:13:17 +00:00
svenbarth
74ca92b5dc + add a message that will be used to complain about static array constants inside dynamic array constants for
Delphi modes

git-svn-id: trunk@39043 -
2018-05-20 11:50:21 +00:00
nickysn
9a4a61ab97 * automatically switch to external linking (and show message) when requested to
generate debug info on the i8086 targets

git-svn-id: trunk@39017 -
2018-05-17 16:11:51 +00:00
nickysn
600b460ecd + added new debug output option -godwarfomflinnum for generating line number
information in OMF LINNUM records, in addition to the DWARF debug information.
  This enables source level debugging on i8086-msdos, when using the Open Watcom
  Debugger, provided the source was compiled with this option and the external
  linker (wlink) was used for generating the executable (the internal linker
  does not yet support generating debug information).

git-svn-id: trunk@39014 -
2018-05-17 14:38:50 +00:00
nickysn
b80642c384 + started implementing support for generating Microsoft CodeView debug
information. Only enabled on i8086 (for now). Does not do much yet, but
  hopefully, soon it'll start emitting line number information for i8086-msdos
  that is usable by DOS debuggers.

git-svn-id: trunk@39006 -
2018-05-16 15:25:33 +00:00
svenbarth
56f36e6509 + add a diagnostic mesage for the used unit scopes
git-svn-id: trunk@38942 -
2018-05-07 19:48:20 +00:00
svenbarth
aa38d6f831 * adjust text for -FN<x> to include both "namespace" and "unit scope"
git-svn-id: trunk@38941 -
2018-05-07 19:48:16 +00:00
svenbarth
7e1a058bb2 * document new -FN<x> option
git-svn-id: trunk@38920 -
2018-05-05 17:18:50 +00:00
florian
42d6e81c33 * made message about subroutines not being inlined a note instead of a hint, see also #33515
git-svn-id: trunk@38690 -
2018-04-05 09:51:25 +00:00
nickysn
602dd31a45 + added a warning for using cs/ds/es/ss segment overrides in inline assembly on
the x86_64 target

git-svn-id: trunk@38517 -
2018-03-13 14:41:21 +00:00
pierre
46d83d296b Add more missing -T options
git-svn-id: trunk@38426 -
2018-03-06 10:05:02 +00:00
pierre
ed15a50562 Add missing arm/i8086 targets
git-svn-id: trunk@38420 -
2018-03-05 22:26:58 +00:00
pierre
5fe20f3f9d Add an explicit comment inside help pages
git-svn-id: trunk@38419 -
2018-03-05 22:08:42 +00:00
nickysn
45fdd7655d + support concatenation of references in x86 intel syntax inline asm:
[expr1][expr2] = [expr1+expr2]
  [expr1[expr2]] = [expr1+expr2]
  This is compatible with TP7's inline asm, and perhaps also with tasm/masm/delphi.

git-svn-id: trunk@38352 -
2018-02-26 17:17:47 +00:00
florian
62df4a4083 * patch by Christo Crause: more descriptive error message when BRxx destination out of reach
git-svn-id: trunk@38340 -
2018-02-25 15:31:17 +00:00
florian
73aef1402b + compiler writes a hint if a subroutine marked as inline cannot be/is not inlined, resolves #31717
+ test

git-svn-id: trunk@38330 -
2018-02-24 14:35:12 +00:00
florian
d031545f88 * warn if the first constant element of a range set expression is greater than the second one, resolves #31936
git-svn-id: trunk@38321 -
2018-02-23 22:30:35 +00:00
marco
b1678f80c7 * some copyright updates, mantis #33208
git-svn-id: trunk@38314 -
2018-02-22 19:15:12 +00:00
florian
5d17b335a6 * based on patch by Christo Crause: when setting the controller type, set also the sub architecture, resolves #33189
git-svn-id: trunk@38285 -
2018-02-18 21:19:35 +00:00
pierre
c3ffd778c0 Add new message for seg(procvar) with is not usable for some i8086 memory models
git-svn-id: trunk@38218 -
2018-02-12 10:06:48 +00:00
Jonas Maebe
1b66995754 * factored out check to determine whether a variable can be subscripted in
inline assembly, and fixed check after r35959 (mantis #32318)
   o can also subscript parameters passed by value on the stack
   o can also subscript local variables, the parameters passed by reference
     that are subsequently copied into a local

git-svn-id: trunk@37886 -
2018-01-01 14:29:21 +00:00
florian
8eb885de91 * better error message if a unit is not found
git-svn-id: trunk@37868 -
2017-12-29 17:27:44 +00:00
florian
5e9ae7f062 * update of german message files by Karl-Michael Schindler, second try, resolves #31921
git-svn-id: trunk@37843 -
2017-12-28 14:59:08 +00:00
florian
8df58981cf * update of german message files by Karl-Michael Schindler, resolves #31921
git-svn-id: trunk@37811 -
2017-12-25 23:01:32 +00:00
nickysn
ed4a5acb31 + added -Twin16 (the 16-bit windows target) to the i8086 crosscompiler help screen
git-svn-id: trunk@37710 -
2017-12-11 14:11:25 +00:00
florian
b41cb26727 + write selected features in ppu of the system unit and load them further on
* ppu version update
* -Sf might be used only during system unit compilation
* loadsystemunit factored out so the system unit can be loaded earlier than other units to get features set

git-svn-id: trunk@37708 -
2017-12-10 16:32:56 +00:00
nickysn
29558a74cd + support exporting labels from asm blocks in intel syntax asm blocks via the
'public' directive

git-svn-id: trunk@37530 -
2017-10-30 16:44:13 +00:00
nickysn
e58bad8eef + check for the 'pop cs' instruction in the x86 inline assembler and print a
warning (on the i8086 target) or an error (on i386 and x86_64) when this
  instruction is used (because it only works on 8086 and 8088 CPUs)

git-svn-id: trunk@37514 -
2017-10-24 15:07:20 +00:00
nickysn
cece021bd1 + check whether the address sizes match for x86 string instructions with two
memory operands, when using the at&t syntax inline assembler

git-svn-id: trunk@37473 -
2017-10-16 16:01:38 +00:00
nickysn
a8232ac477 + added warning if source or destination for x86 string instructions isn't
specified to be (%esi) or (%edi), when using at&t syntax assembler (this is
  not considered an error by intel syntax assemblers, so we're not adding a
  warning there, for now)

git-svn-id: trunk@37458 -
2017-10-14 15:27:00 +00:00
nickysn
1ee36b5b9b + added error message in the intel assembler reader, when an attempt is made to
override the ES segment in an x86 string instruction (because it cannot be
  overriden)

git-svn-id: trunk@37454 -
2017-10-13 14:56:38 +00:00
svenbarth
fcc1ce7a08 * fix for Mantis #30344: applied patch by Mario Ray Mahardhika to add new command line option -Sj[-|+] to control writeable typed constants (with a small adjustment to the help text)
+ added test

git-svn-id: trunk@37437 -
2017-10-09 19:19:23 +00:00
svenbarth
9619576515 + add support for $SetPE{OS,SubSys,User}Version directives; Delphi compatible; Note: $SetPEUserVersion takes precedence to $Version
+ added test

git-svn-id: trunk@37364 -
2017-09-30 13:55:29 +00:00
pierre
91fa2999ee Add aarch64 and sparc64 linux targets to help output
git-svn-id: trunk@37249 -
2017-09-18 11:58:45 +00:00
Károly Balogh
2126f008f9 m68k: added NetBSD and MacOS to the compiler help output as targets
git-svn-id: trunk@37029 -
2017-08-22 10:42:27 +00:00
pierre
edfcb6558b -Tandroid is for mipsel not mipseb
git-svn-id: trunk@36895 -
2017-08-14 10:47:14 +00:00
pierre
8fba611697 Remove obsolete -Tsunos help line, it is not accpeted by the compiler anymore
git-svn-id: trunk@36827 -
2017-08-04 09:38:08 +00:00
nickysn
d3251a349b + set the code page for errorct.msg (Catalan) to Windows 1252
git-svn-id: trunk@36457 -
2017-06-08 20:48:58 +00:00
nickysn
7252e3183b + set code page for erroriu.msg (Italian) to 1252 (could also be ISO 8859-1)
git-svn-id: trunk@36456 -
2017-06-08 20:43:20 +00:00
nickysn
5df3e2cfc2 + set the code page of errord.msg (German) to 850; the file contents were also
regenerated from errordu.msg, which fixed two small typos (that were fixed
  only in errordu.msg, but hadn't been applied to errord.msg)

git-svn-id: trunk@36455 -
2017-06-08 20:34:50 +00:00
nickysn
4d79c91507 + set code page 20127 (US-ASCII) for errorid.msg (Indonesian)
git-svn-id: trunk@36454 -
2017-06-08 20:24:19 +00:00
nickysn
c0413a9179 + added codepage info (not used by the compiler yet) to the compiler .msg files
git-svn-id: trunk@36448 -
2017-06-08 15:44:04 +00:00
pierre
22021dd0b8 Add help for second argument to -Ch option, -Chx,y y is max heap size
git-svn-id: trunk@36258 -
2017-05-19 21:27:08 +00:00
pierre
b7fab7d39c Add -Wh command line option to enable HugeCode (equivalent of $F+)
for msdos memory models that support this.
  Add message to document this new command line option.

git-svn-id: trunk@36199 -
2017-05-12 22:49:50 +00:00
svenbarth
e9c40f5b24 + correctly handle COMDAT sections in COFF files (at least as long as the COMDAT selection isn't IMAGE_COMDAT_SELECT_ASSOCIATIVE or IMAGE_COMDAT_SELECT_EXACT_MATCH), fixes the .refptr problems mentioned in Mantis #30614
git-svn-id: trunk@36197 -
2017-05-12 15:57:31 +00:00
florian
e7fd71db36 + write name of segment/group which is too large
git-svn-id: trunk@35456 -
2017-02-19 19:15:18 +00:00
florian
c4fe4ab1f5 * correctly handle push <imm> on 80186+
git-svn-id: trunk@35455 -
2017-02-19 19:15:16 +00:00
svenbarth
a9888eba70 * also generate Big Obj COFF files with the GNU utilities (needs 2.25 or newer), at least as long as the new option -a5 isn't given, which disables this
Note 1: using an older AS might fail anyway if the amount of sections is too high (like in packages\odata\src\sharepoint.pp)
Note 2: it might be an idea to keep track of the created sections in the asmlists and only enable the option if *really* necessary (like with the internal COFF output generator), though this might lead to false positives due to multiple sections with the same name (since I'd prefer to use the KISS principle only a counter would be used)

git-svn-id: trunk@35381 -
2017-02-03 22:45:32 +00:00
florian
668b198d7c * fix for issue #29936: check if the internal needed types are available
git-svn-id: trunk@35310 -
2017-01-15 20:54:07 +00:00
Jonas Maebe
9cd707a27a * give an error if -Pxxx is specified to the compiler binary and xxx is not
the target architecture this compiler binary supports (mantis #30098)

git-svn-id: trunk@35299 -
2017-01-14 13:50:41 +00:00
florian
29a2c433f7 * -Sr option for iso mode: in case no command line parameter is passed, the file name for program parameters is derived from their variable name
git-svn-id: trunk@35257 -
2017-01-07 14:50:58 +00:00
florian
466d26b5ef * copyright notice updated to 2017
git-svn-id: trunk@35234 -
2017-01-04 21:32:19 +00:00
svenbarth
bec40e9a4a * fix for Mantis #31146: update German message files courtesy of Karl-Michael Schindler (the text "CheckPointer-Funktion" was also changed to "CheckPointer-Option" in both files for consistency with the English file)
git-svn-id: trunk@35183 -
2016-12-23 15:57:29 +00:00
svenbarth
88a0d8bc25 * use "CheckPointer option" instead of "CheckPointer function" for consistency with the other CheckPointer related message
git-svn-id: trunk@35181 -
2016-12-23 15:54:28 +00:00
svenbarth
d499163ef5 * provisional fix for Mantis #31076: fail gracefully instead of with an internal error if a generic method is declared inside a generic class or record. This will change once we support nested generics however.
* adjusted error message to reflect that we're not only dealing with generic classes
+ added test; note: it's added in webtbs, cause the test will loose its %FAIL attribute in the future

git-svn-id: trunk@35079 -
2016-12-06 22:26:53 +00:00
Károly Balogh
64650261d1 m68k: refactor of the reglist and the regpair support in the assembler reader. also added support for float register lists for FMOVEM
git-svn-id: trunk@34783 -
2016-11-05 18:53:20 +00:00
svenbarth
254be82c43 * revert r34712: the behavior with the class constructors is indeed Delphi compatible. However only one class constructor/destructor per class is allowed no matter how it's named.
git-svn-id: trunk@34713 -
2016-10-13 20:11:35 +00:00
svenbarth
4e5ed5b0e2 Fix for Mantis #30729: don't allow other names for class constructors or destructors than Create and Destroy respectively.
+ added tests

git-svn-id: trunk@34712 -
2016-10-13 19:24:07 +00:00
pierre
5ff557fd99 * msg/errore.msg: Add new message saying that -gc and -Ur options are incompatible
Add description to -gc option, saying it is experimental.
   Add warning at link time for program/library if checkpointer is used in any unit or main code.

git-svn-id: trunk@34565 -
2016-09-27 14:44:50 +00:00
yury
db590da1e6 * Added a new debug option switch -godwarfcpp - Simulate C++ debug information in DWARF. It is more correct way to workaround LLDB issues than in r34558. This option can be used for debuggers, which does not support Pascal correctly.
git-svn-id: trunk@34562 -
2016-09-26 13:05:17 +00:00
pierre
270d5bedec Add missing -Tlinux help line for mipsel compiler
git-svn-id: trunk@34447 -
2016-09-08 05:52:38 +00:00
Károly Balogh
464ecab542 huge syscall support refactor for Amiga-likes. removed large chunks of ancient duplicated code, and in general tried to make the entire thing more maintainable and cleaner. also added support for AROS EAXBase syscall convention
git-svn-id: trunk@34416 -
2016-09-03 07:57:23 +00:00
pierre
e6871efbf6 Add aarch64 to -P<x> CPU list
git-svn-id: trunk@34270 -
2016-08-11 09:06:14 +00:00
svenbarth
0387a77e4a + new text for the PPL filename of a package
git-svn-id: trunk@34232 -
2016-07-29 18:43:56 +00:00
Károly Balogh
b0ca7e9594 show AT&T and Intel style assembler switches in i8086 and x86_64 help text. also fix Motorola name initials at several places for 68k
git-svn-id: trunk@34081 -
2016-07-06 13:34:38 +00:00
marco
bb75790e38 * german error file updates mantis #30024
git-svn-id: trunk@33977 -
2016-06-12 20:37:17 +00:00
svenbarth
88108bc4df Extend "compilerproc" with the optional ability to specify an index (same syntax as for "internproc") which allows to map the routine to a syssym.
git-svn-id: trunk@33890 -
2016-06-03 20:53:33 +00:00
svenbarth
cde95b0e4a Merge all message related changes from the package branch
Merged revision(s) 29015, 29036, 31989, 32132-32133, 32306, 32478, 32513 from branches/svenbarth/packages:
Start to use package related messages
........
+ add a error message for specifying a package multiple times

........
msg/errore.msg:
  + add additional messages for implicitely imported units and units that must not be part of a package
........
* fix name of section for package related messages
+ add missing EndOfTex tag
........
+ add more package loading related messages
........
errore.msg:
  + new message that a PPU is loaded from a package
........
+ new message for when a unit is listed in the contains section that is already part of another package

........
msg/errore.msg:
  + new message when a unit from an indirectly referenced package is used

........

git-svn-id: trunk@33450 -
2016-04-08 14:56:20 +00:00
florian
f01edc0a57 * copyright message updated to 2016
git-svn-id: trunk@33249 -
2016-03-13 19:37:57 +00:00
florian
3499c59872 * update of German messages files by Karl-Michael Schindler, resolves #29628
git-svn-id: trunk@33197 -
2016-03-06 17:11:33 +00:00
florian
cb4773432b + hardfloat directive (arm only): use hard float calling conventions regardless of the abi, resolves #29715
git-svn-id: trunk@33196 -
2016-03-06 15:47:31 +00:00
nickysn
06b9789928 + implemented a new {$ASMCPU XXX} directive, allowing to specify a different
CPU target for inline assembler blocks. In addition to the different CPUs
  (as listed under 'Supported CPU instruction sets:' in the output of 'fpc -i'),
  it also supports the special values 'ANY' and 'CURRENT'. 'ANY' means no
  restrictions (i.e. all instructions are available). 'CURRENT' means the
  current CPU target (as specified with the '-Cp' command line option). For
  backward compatibility, the default value is 'ANY' for all CPU targets, except
  i8086, where it defaults to 'CURRENT'.

  This directive requires support for the new asd_cpu directive in the assembler
  writer. This is currently implemented only for NASM, but will be supported in
  some of the other assembler writers as well (incl. the x86 internal assembler
  writer).

git-svn-id: trunk@33138 -
2016-02-29 22:25:25 +00:00
Tomas Hajny
6a8caf84b2 * -Mdelphiunicode added to the help pages
git-svn-id: trunk@33053 -
2016-02-05 15:31:38 +00:00
florian
aa0ec8c0e5 + show -Mextendedpascal in the help page
git-svn-id: trunk@33051 -
2016-02-04 20:32:09 +00:00
florian
368d77dfae + show -Miso in the help page
git-svn-id: trunk@33050 -
2016-02-04 20:22:36 +00:00
svenbarth
e9d8fadb58 Merged revision(s) 28237 from branches/svenbarth/packages:
Add a new target flag which determines whether the target supports dynamic packages or not.

systems.pas:
  + new flag tf_supports_packages
pmodules.pas, proc_package:
  * error out when flag tf_supports_packages is not set for the current target
msg/errore.msg:
  + error message for when tf_supports_packages is missing and a package file is compiled
........

git-svn-id: trunk@32978 -
2016-01-22 15:35:41 +00:00
nickysn
a508f9e5d3 + added check if the selected cpu is 386+ when writing a 66h or 67h prefix in
the i8086 internal object writer. This allows weeding out spurious 386
  instructions, as is similarly done by NASM when using it as an external
  assembler.

git-svn-id: trunk@32871 -
2016-01-07 15:40:32 +00:00
nickysn
114c76bc4a + added i8086 to the list of supported cpus in the compiler usage help screen
git-svn-id: trunk@32870 -
2016-01-07 14:38:25 +00:00
florian
37cb35d780 + support for the .code directive in arm inline assembler
git-svn-id: trunk@32840 -
2016-01-03 22:08:25 +00:00
Károly Balogh
3675fc75cb VLink Support:
* fixed for MorphOS, added for Amiga/m68k
* enabled as default when running natively on these systems (cross still defaults to GNU LD)
* added -XV command line switch to enable/disable it
* dropped the 'fpc' prefix from vlink binary name on MorphOS

git-svn-id: trunk@32324 -
2015-11-15 01:18:30 +00:00
svenbarth
dabde774c4 Fix for Mantis #29005.
errore.msg:
  * consequently use <x> instead of xxxx for value placeholders

git-svn-id: trunk@32322 -
2015-11-14 21:22:15 +00:00
nickysn
a553b15a1c + handle properly inline asm segment constants different than word:
o 'DB SEG symbol' produces an error
  o 'DD SEG symbol' (and anything larger than DW, like DQ) adds extra high zeros
    to the segment constant (this is Turbo Pascal 7 compatible)

git-svn-id: trunk@32283 -
2015-11-10 21:18:34 +00:00
nickysn
995ca4fb12 + implemented the 'SEG @DATA' inline assembler directive for i8086
git-svn-id: trunk@32280 -
2015-11-10 17:26:21 +00:00
nickysn
7d41d19150 + added an error message when trying to compile a tiny model DOS .COM file with
segment relocations

git-svn-id: trunk@32276 -
2015-11-08 21:13:16 +00:00
pierre
5c5c28ab9b Add new general_e_exception_raised Error
git-svn-id: trunk@31799 -
2015-09-23 16:39:23 +00:00
svenbarth
79f19f79f2 msg/errore.msg:
+ add error message if a generic method is declared inside an interface
  + add error message if a generic method is declared as virtual

git-svn-id: trunk@31764 -
2015-09-18 14:52:47 +00:00
Jonas Maebe
4564bffb85 * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script (fixed version of r31664, thanks to Alan Modra)
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31675 -
2015-09-14 07:24:54 +00:00
Jonas Maebe
e06a759e20 - reverted r31664, it causes crashes with some ld versions :/
git-svn-id: trunk@31670 -
2015-09-13 20:14:46 +00:00
Jonas Maebe
cd41bf672c * use binutils 2.19+ linker script "augmentation" functionality to specify
how the fpc sections have to be linked *on Linux*. This prevents the
    "did you forget -T" warnings from ld, and in general is more correct than
    our previous approach of specifying a complete linker script without -T
    and hoping that there won't be any unexpected interactions with ld's
    built-in linker script
   o use the new -X9 command line option to generate linker scripts that
     are compatible with binutils older than 2.19 (reverts to the old
     behaviour)

git-svn-id: trunk@31664 -
2015-09-13 19:06:14 +00:00
nickysn
253793ab9d + added the 'farprocspushoddbp' target switch to the help screen
git-svn-id: trunk@31570 -
2015-09-07 19:23:25 +00:00
nickysn
4c9b339c22 + added the huge memory model option to the compiler help screen
git-svn-id: trunk@31518 -
2015-09-04 20:43:38 +00:00
Jonas Maebe
e720b44471 * expand the error message for when trying to use a formal class with an
explanation of what to do

git-svn-id: trunk@31457 -
2015-08-30 14:32:56 +00:00
nickysn
e9c790f4eb + support 'SEG' in the i8086 inline assembler
git-svn-id: trunk@31428 -
2015-08-26 15:57:44 +00:00
nickysn
6e20e0fc84 + added checks and error messages in case a 16-bit segment or group exceeds 64k
git-svn-id: trunk@31416 -
2015-08-25 01:01:20 +00:00
florian
ee89e99189 * correctly write an error if one tries to implement a method introduced in a generic in a specialization of the generic, resolves issue #23169
git-svn-id: trunk@31241 -
2015-07-28 21:16:47 +00:00
florian
f2a5672355 * Update of German error message files by Karl-Michael Schindler, resolves issue #28010
git-svn-id: trunk@30763 -
2015-05-02 13:34:03 +00:00
Jonas Maebe
e3ddf1c0b7 * fixed typos in error.msg (patch by Stéphane Aulery, mantis #27931)
git-svn-id: trunk@30725 -
2015-04-25 18:15:18 +00:00
nickysn
bde7d0aacb + added "code segment too large" and "data segment too large" error messages
git-svn-id: trunk@30687 -
2015-04-20 23:47:22 +00:00
Jonas Maebe
3684e7665d * changed temporary type_e_anonymous_function_unsupported message into an
inline comment, because using a high message number wastes space in
    the messages array

git-svn-id: trunk@30666 -
2015-04-19 14:31:35 +00:00
michael
d802842ecf * Committed working patches to error message files from Stéphane Aulery
git-svn-id: trunk@30617 -
2015-04-17 12:19:13 +00:00
michael
b2caba585d * Patch from Stéphane Aulery to fix typos in compiler messages (bug ID 27857)
git-svn-id: trunk@30604 -
2015-04-15 17:34:56 +00:00
nickysn
470fb65e80 + implemented aasmcpu.process_ea for i8086
git-svn-id: trunk@30495 -
2015-04-08 12:54:09 +00:00
florian
9ab9e03650 * limit number of possible units with initialization/finalization for a certain architecture to high(aint)
+ give an error if the number of possible units is exceeded

git-svn-id: trunk@30450 -
2015-04-05 21:06:58 +00:00
florian
b07ba5786b * updated errord(u).msg files by Karl-Michael Schindler, resolves #27725
git-svn-id: trunk@30382 -
2015-03-29 20:02:06 +00:00
Tomas Hajny
9f9ab082da * fix typo (space instead of underscore resulting in broken help display)
git-svn-id: trunk@30041 -
2015-02-28 23:30:24 +00:00
florian
91db2a1698 + report when compilation of a unit is stopped because it has been already compiled during the recursive search in uses clauses
git-svn-id: trunk@30001 -
2015-02-24 21:46:09 +00:00
Jonas Maebe
3b5adcb3de + print iphonesim/x86_86-specific command line options in the help
git-svn-id: trunk@29982 -
2015-02-23 22:57:12 +00:00
Jonas Maebe
dcb6f2baae + print Darwin/AArch64-specific command line options in the help
git-svn-id: trunk@29981 -
2015-02-23 22:57:09 +00:00
florian
0d944c8b1d * update of german message files by Karl-Michael Schindler, resolves #27342
git-svn-id: trunk@29595 -
2015-02-01 16:24:23 +00:00
Jonas Maebe
146e3bcb9e * synchronised with trunk till r29513
git-svn-id: branches/blocks@29516 -
2015-01-21 23:28:34 +00:00
Jonas Maebe
e97f31541e - reverted partial commit of merge
git-svn-id: branches/blocks@29515 -
2015-01-21 23:24:37 +00:00
Jonas Maebe
a76bbf363d * synchronised with trunk r29513
git-svn-id: branches/blocks@29514 -
2015-01-21 23:18:29 +00:00
Jonas Maebe
990e47f2d3 * give a warning instead of an error if a parameter or local variable in a
an Objective-C method masks an identifier from a category, because due
    to the fact that all standard categories are imported at the same time via
    the CocoaAll unit, this can often happen with categories you don't know/
    care about. These errors also didn't happen in 2.6.x

git-svn-id: trunk@29497 -
2015-01-17 15:27:42 +00:00
florian
d25dbec070 * allow the varargs directive in combination with stdcall as well, resolves #27299
git-svn-id: trunk@29496 -
2015-01-17 14:23:38 +00:00
Tomas Hajny
b1e51054cb * add information about -vz to the help pages
git-svn-id: trunk@29475 -
2015-01-14 17:08:26 +00:00
pierre
18fe66b0e7 Added two new messages for changes in assembler symbols after use.
Those changes can lead to invalid code generation.

git-svn-id: trunk@29444 -
2015-01-12 10:05:21 +00:00
svenbarth
af43e5e3e9 Fix for Mantis #24872.
psub.pas, tcgprocinfo.parse_body:
  * also check record symtables besides object symtables to determine whether the staticsymtable is accessed from a globally declared generic
  * use a translateable message if the static symtable is accessed if it should not
msg/errore.msg:
  + add new error message for when the static symtable is accessed from a global generic
msgidx.inc & msgtixt.inc:
  * regenerated

+ added test

git-svn-id: trunk@29427 -
2015-01-06 20:46:12 +00:00
florian
9b6b029ca1 * patch by Yuri Zaporozhets to fix typos in text messages, resolves #27250
git-svn-id: trunk@29396 -
2015-01-04 20:46:36 +00:00
florian
2c26c35eb6 * updated copyright year to 2015
+ added "and others" if translation was not updated yet

git-svn-id: trunk@29383 -
2015-01-04 15:26:29 +00:00
Tomas Hajny
ee82b6ea0b * do not mention OS/2 and EMX on option list for x86_64
git-svn-id: trunk@29318 -
2014-12-23 23:08:43 +00:00
florian
4289dd667d * managed types cause a different warning/hint when they are
used uninitialized, so users can turn off these messages if they want, resolves #24601 and #26403

git-svn-id: trunk@29295 -
2014-12-14 20:48:54 +00:00
florian
bb01872821 + handle -CPPACKENUM and -CPPACKRECORD, resolves #27153
git-svn-id: trunk@29283 -
2014-12-13 21:08:18 +00:00
michael
a127bfa51d * Fixed tex marker
git-svn-id: trunk@29276 -
2014-12-12 20:02:09 +00:00
svenbarth
e614914016 Fix a grammatical error in warning asmr_w_global_access_without_got
git-svn-id: trunk@29238 -
2014-12-09 21:19:21 +00:00
florian
25e19f27a0 + write name of missing feature in error message
git-svn-id: trunk@29211 -
2014-12-07 18:20:56 +00:00
florian
ce96980f39 * updates to German message files by Karl-Michael Schindler, resolves #27061
git-svn-id: trunk@29148 -
2014-11-25 19:07:23 +00:00
svenbarth
2288df9fcf Fix for Mantis #27073. The -vx option is not only for Win32, but in fact for information about tool invocation on all platforms.
git-svn-id: trunk@29129 -
2014-11-23 20:46:45 +00:00
Tomas Hajny
4c98113569 * note about multiple 't' in -gt added to the help page
git-svn-id: trunk@29099 -
2014-11-21 13:53:53 +00:00
Tomas Hajny
fc17e318b0 * add some previously missing options to the help page, add support for listing recognized compiler and RTL features in -i and allow skipping an empty section (controllertypes) in -i listing by providing support of multiple output lines based on one source line in the msg file using $\n as newline
git-svn-id: trunk@29097 -
2014-11-21 13:03:24 +00:00
Tomas Hajny
f7e6ea56d9 * support for machine-parseable output of information in fpc -i plus improvements in help (including previously missing information for some less used platforms
git-svn-id: trunk@29032 -
2014-11-09 14:55:31 +00:00
Tomas Hajny
2a0d760a3f * fixed typo (can not)
git-svn-id: trunk@29030 -
2014-11-08 21:03:22 +00:00
Jonas Maebe
839d11eac9 * mention that misplaced global directives are ignored (mantis #27004)
git-svn-id: trunk@28998 -
2014-11-06 09:02:40 +00:00
Károly Balogh
4431ba2c08 merged/updated AROS/i386 target to trunk from AROS branch, to support Marcus Sackrow's work on AROS support which will hopefully benefit all Amiga-like targets (classic, MorphOS) on the long run. Compiler only, RTL comes in the next run.
git-svn-id: trunk@28432 -
2014-08-17 18:18:07 +00:00
Jonas Maebe
c730e16031 * changed the syntax for block procvars from "xxx is block" to
"reference to ...; cdecl;". The "reference to ..." syntax is what Delphi
    uses for anonymous function references. The "cdecl;" indicates that this
    is for the C-variant of such references, which is what blocks are

git-svn-id: branches/blocks@28233 -
2014-07-18 09:15:29 +00:00
Tomas Hajny
109d890adf * added description for option @ and missing bracket at the end of list for -P
git-svn-id: trunk@28187 -
2014-07-08 22:33:00 +00:00
nickysn
7f9fa145e8 + added error message in case the HUGEPOINTERNORMALIZATION directive is used
with an invalid argument

git-svn-id: trunk@28152 -
2014-07-04 17:16:58 +00:00
nickysn
a3b48b79cb - rm the scan_w_hugepointernormalization_not_support message, replaced with
scanner_w_directive_ignored_on_target

git-svn-id: trunk@28150 -
2014-07-04 14:03:18 +00:00
svenbarth
30be5d8d33 As discussed on core enable the abstract class construction warning by default and also make it controllable with {$warn constructing_abstract ...}.
* scandir.pas, dir_warn: also adjust the message state for type_w_instance_abstract_class if the identifier is CONSTRUCTING_ABSTRACT
* msg/errore.msg: enable type_w_instance_abstract_class by default

* msgidx.inc, msgtxt.inc: updated

git-svn-id: trunk@28137 -
2014-07-02 19:40:22 +00:00
Jonas Maebe
43839d1bda * update of German error message files by Karl-Michael Schindler
(mantis #26282)

git-svn-id: trunk@28129 -
2014-07-02 17:17:38 +00:00
svenbarth
a7a9440692 Add a new warning message that is generated if an instance of an abstract class is created. This message is disabled by default, but can be switched on by using {$warn 4122 on} or {$warn 4122 error}.
Please note that this warning won't be triggered if an instance of that class is created using a class variable of that class type as the compiler can not know the type contained in the variable at compile time (see also the added test).

+ msg/errore.msg: added disabled message which informs about the instantiation of an abstract class
* pexpr.pas, do_member_read: generate the message if we have a constructor call for an abstract class using a loadvmtaddrnode (thus the type name is used and not a class variable)

* msg{idx,txt}.inc: updated

+ added test

git-svn-id: trunk@28127 -
2014-07-01 20:41:05 +00:00
nickysn
b3bb9df19f + added a $HUGEPOINTERNORMALIZATION switch
git-svn-id: trunk@28088 -
2014-06-27 13:56:12 +00:00
nickysn
8b7863d076 + added warning in case a far pointer is declared on a platform that does not
support them

git-svn-id: trunk@28084 -
2014-06-27 09:26:08 +00:00
nickysn
140ce2a880 + added the compact and large memory models to the compiler command line option
help screen

git-svn-id: trunk@28082 -
2014-06-26 22:56:55 +00:00
nickysn
ce87e72721 * show an error if the user attempts to create a dos .com file in an i8086
memory model other than tiny

git-svn-id: trunk@28081 -
2014-06-26 22:52:57 +00:00
nickysn
db011dfb7a + added a warning if HeapMax<HeapMin is specified with the $M directive
git-svn-id: trunk@28042 -
2014-06-24 09:16:03 +00:00
Jonas Maebe
2df1d5ec58 * don't allow default parameter values for parameter types that don't accept
constant values (i.e., anything non-value/const/constref) (mantis #263363)
   o fixed default parameter value for var-parameter in chmreader

git-svn-id: trunk@28016 -
2014-06-20 19:50:20 +00:00
nickysn
82eb84ddff + added warning in case of an $M directive with an invalid stack size specified
git-svn-id: trunk@27964 -
2014-06-15 10:14:56 +00:00
sergei
3c1368903f * Updated header: this file is in cp866 encoding.
git-svn-id: trunk@27819 -
2014-05-27 22:45:04 +00:00
nickysn
ce0bd81273 + show an error message 'procedure must be far' if an attempt is made to convert
a near proc to a procvar in a i8086 far code memory model

git-svn-id: trunk@27567 -
2014-04-13 19:29:28 +00:00
florian
d88d644925 + support for FMA intrinsic: if there is no hardware support, the compiler throws an error.
Currently it is implemented only for x86-CPUs supporting the FMA extension. While it would
  be possible to implement it in software or simulate fma(<single>,<single>,<single>) using
  double operations, it makes no sense in my opinion to do so.

git-svn-id: trunk@27564 -
2014-04-13 19:21:54 +00:00
Jonas Maebe
d9dab6f2f1 * changed the severity of messages showing overloaded routines with all
parameters from hint to error in case they give more information
    about definition errors

git-svn-id: trunk@27521 -
2014-04-10 21:07:17 +00:00
Jonas Maebe
4a0528399e * check all overloaded routines for mangled name conflicts on the JVM
platform, as different Pascal declarations are mapped to the same
    JVM representation

git-svn-id: trunk@27520 -
2014-04-10 21:07:14 +00:00
pierre
ca156aa64a Force external linker for nasm smartlinking
git-svn-id: trunk@27512 -
2014-04-10 15:02:04 +00:00
Jonas Maebe
9420a5d7a7 * also check for targets not supporting -gc/checkpointer functionality in
compiler directives, not just on the command line (mantis #25862)

git-svn-id: trunk@27128 -
2014-03-13 20:42:18 +00:00
florian
6697939903 * replaced some aren't, weren't, can't by are not, were not, cannot
git-svn-id: trunk@26842 -
2014-02-22 16:07:27 +00:00
florian
76b2074e59 * updated year in logo from 2013 to 2014
git-svn-id: trunk@26841 -
2014-02-22 15:58:03 +00:00
sergei
e1cf19d05d + Require -d and -u command line options to have an argument, Mantis #25082.
+ Check that argument of -d and -u is a Pascal identifier, Mantis #17056.

git-svn-id: trunk@26755 -
2014-02-12 04:44:35 +00:00
pierre
b4d0cf5593 * Add different message for static libraary not supported
git-svn-id: trunk@26596 -
2014-01-27 22:26:29 +00:00
pierre
af83a74544 Add -h output for new assemblers
git-svn-id: trunk@26551 -
2014-01-21 09:00:53 +00:00
pierre
e44dc53083 Add help output for new -ao option to set asmextraopt
git-svn-id: trunk@26543 -
2014-01-21 00:20:23 +00:00
paul
79ef05407a compiler: fix error message (was error message about resourcestring for property)
git-svn-id: trunk@26389 -
2014-01-05 07:12:41 +00:00
paul
52d1cbc544 compiler:
+ add -FM command line option to pass directory for unicode binary files
  + enable dynamic loading of charset files (don't disable runtime charset files for the moment)

git-svn-id: trunk@26378 -
2014-01-04 15:44:18 +00:00
paul
1c578de28c compiler:
* don't allow to apply the same hint directive twice
  * change parser_e_proc_dir_not_allowed to more generic variant parser_e_dir_not_allowed - they are similar and 'procedure' prefix does not give more information about the error.
  * maybe_parse_hint_directives() uses procdef settings for initial values
  + add tests

git-svn-id: trunk@25720 -
2013-10-08 04:56:42 +00:00
nickysn
4d6a9137cf + added the new -CTcld option to the help screen
git-svn-id: trunk@25597 -
2013-09-28 16:05:01 +00:00
nickysn
912299e9e7 + documented the new options -Wtexe and -Wtcom in the fpc help
git-svn-id: trunk@25530 -
2013-09-21 17:17:50 +00:00
florian
02e054a09e + fpc -i now writes also the available inline assembler input modes
git-svn-id: trunk@25482 -
2013-09-13 19:10:59 +00:00
paul
8d526e9b07 compiler: add a check for srsym <> nil since try_consume_unitsym may change srsym to nil, better error message
git-svn-id: trunk@25423 -
2013-09-05 08:39:10 +00:00
Jonas Maebe
a14ceba791 + -CTinitlocals switch for the JVM that initialises all local variables
that may trigger JVM bytecode verification errors if they are used
    before they are initialised (this includes passing them as a "var"
    parameter) + test
  * sorted -CT parameters alphabetically and alligned them

git-svn-id: trunk@25387 -
2013-08-29 22:21:23 +00:00
Jonas Maebe
6013606a97 + -CTlowercaseprocstart switch to lowercase the first character of routines
so that code written according to Delphi coding standards can be compiled
    into JVM bytecode with routine names conforming to JVM coding standards

git-svn-id: trunk@25385 -
2013-08-29 22:21:15 +00:00
florian
f58d1461c3 * fixed help page for -C3 as mentioned by Dmitry Boyarintsev on the mailing list
git-svn-id: trunk@25375 -
2013-08-26 20:48:49 +00:00
florian
d4968e054b + arm: tsettings.instructionset
* the selected instruction set is now independent from the cpu type: e.g. armv7-a can perfectly execute thumb(2) code

git-svn-id: trunk@25370 -
2013-08-25 21:56:12 +00:00
nickysn
243e3bbb77 + added i8086 memory model flags to the ppu flags and added a check that prevents the using of units compiled for different memory models
git-svn-id: trunk@25365 -
2013-08-25 16:45:04 +00:00
florian
9c1a4e2217 o error message file update by Karl-Michael Schindler:
* updated german ones
  * small mistake in english one corrected

git-svn-id: trunk@24915 -
2013-06-18 18:31:24 +00:00
florian
37df6f6455 * nostackframe now results in an error if used on pascal subroutines
git-svn-id: trunk@24910 -
2013-06-16 18:59:03 +00:00
svenbarth
b6bfa864d4 Disallow the usage of the inline assembler inside generics, because there are currently two problems:
1. At least on x86 the assembler reader initializes the parameter location informations which results in InternalError 200301231
2. Assembler tokens are not stored in the token stream and thus won't be reproduced during specialization

x86/rax86int.pas, tx86intreader.Assemble:
  * check for "parse_generic" before calling generate_parameter_info
pstatmnt.pas, assembler_block & statement:
  * generate an error message if an asm statement should be parsed inside a generic

+ added test

git-svn-id: trunk@24892 -
2013-06-13 19:42:49 +00:00
svenbarth
2e186a91fa Add support for integer constants to SetPEFlags and SetPEOptFlags. This is Delphi compatible.
scandir.pas:
  + add function "get_peflag_const" to retrieve the value of a constant
  * dir_setpeflags & dir_setpeoptflags: first check for an identifier (value is retrieved through "get_peflag_const") and then read a value

+ added messages for illegal parameters for SetPEFlags and SetPEOptFlags respectively
+ added tests

git-svn-id: trunk@24887 -
2013-06-13 10:51:42 +00:00
nickysn
fa9c26f76f + medium memory model added to the compiler help messages
git-svn-id: trunk@24867 -
2013-06-10 21:04:54 +00:00
nickysn
b409d600ee + implemented the tiny memory model for i8086-msdos; we now produce working dos .com files as well
git-svn-id: trunk@24793 -
2013-06-02 23:02:10 +00:00
Jonas Maebe
262593c571 * "can not" -> "cannot"
git-svn-id: trunk@24012 -
2013-03-26 18:35:38 +00:00
florian
79d5d83f6c * fixed lazy english
git-svn-id: trunk@23975 -
2013-03-23 19:29:30 +00:00
svenbarth
376bd046aa Don't allow "static" for class operators or normal methods (except in objects).
pdecsub.pas, pd_static:
  * check whether the given pd is an operator or a class method not inside an Object and generate an error if either of these is true
msg/errore.msg, msgidx.inc, msgtxt.inc:
  * add a message to inform that a certain procedure directive is not allowed

+ added tests

git-svn-id: trunk@23944 -
2013-03-20 10:46:55 +00:00
florian
7511968f2b + warn if one of the linux libc startup code files is not found
git-svn-id: trunk@23892 -
2013-03-17 14:51:19 +00:00
florian
3b7a9543c6 * updates of german message files by Karl-Michael Schindler
git-svn-id: trunk@23619 -
2013-02-14 18:54:26 +00:00
svenbarth
489e038379 Disallow "protected" and "strict protected" in extended records (Delphi compatible).
ptype.pas, parse_record_members:
  * write an error message if "protected" or "strict protected" is encountered
msg/errore.msg:
  + add an error message for disallowed "things" in records

+ added test
* adjusted test (note: according to the bug report this test did not originally have the "protected" section, but it was added by Paul before commiting)

git-svn-id: trunk@23596 -
2013-02-11 18:46:47 +00:00
svenbarth
344571cb4e Added support for type helpers. In non Delphi modes they use "type helper" and in mode Delphi they use "record helper". They can also be used on constants.
symconst.pas:
  + extend "thelpertype" by "ht_type" which tells the code in "pdecobj.parse_extended_type" that a type helper declaration has been parsed
node.pas:
  + add a constant which identifies all constant node types
ptype.pas:
  + read_named_type: add a parameter "hadtypetoken" to tell the code whether a "type" token had been parsed before
  + read_named_type: if an identifier "helper" is parsed we need to check whether "hadtypetoken" is true and the modeswitch "m_class" is set, but the "m_delphi" one is not; in that case we have a "type helper" declaration
pgenutil.pas, generate_specialization:
  * adjust call to read_named_type
pdecl.pas, types_dec:
  * adjust call to read_named_type

pdecobj.pas:
  * parse_extended_type: extend for correct handling of primitive types (includes Delphi compatible handling as well) and reject types that are explicitly not allowed
  * method_dec: require "static" for class methods in type helpers
  * method_doc: allow constructors for type helpers as well
paramgr.pas, tparamanager:
  * set_common_funcretloc_info: handle type helper constructors like record constructors
  * handle_common_ret_in_param: the "self" value of a type helper constructor is also returned in a parameter
pexpr.pas:
  + add a function to postfixoperators which tries to find and apply a type helper for a given type
  * postfixoperators: try to apply type helpers for ordinal constants
  * postfixoperators: use the correct string type for string constants
  * postfixoperators: try to apply type helpers for enum constants
  * postfixoperators: try to apply type helpers for arrays
  * postfixoperators: try to apply type helpers for Variant
  * postfixoperators: try to apply type helpers for pointer types
  * postfixoperators: try to apply type helpers for other types
  * factor: check postfixoperators after _REALNUMBER, _CCHAR, _CWCHAR, _TRUE and _FALSE
  * factor: also check postfixoperators if a _POINT follows a _NIL

symdef.pas, tdefawaresymtablestack.addhelpers:
  * use "generate_objectpascal_helper_key" to generate the key
symtable.pas:
  + add function to generate the key value for the map of extended types using the extended def
  * adjust "search_last_objectpascal_helper" and "search_objectpascal_helper" to handle primitive types as well
  * use the new "generate_objectpascal_helper_key" function to generate the key

pparautl.pas:
  * insert_self_and_vmt_para: don't insert the $vmt symbol for record or type helpers (ToDo: check whether class helpers really need the symbol as well)
  * insert_self_and_vmt_para: pass "self" as var parameter for type helpers as well
psub.pas, generate_bodyentry_block: 
  * also allow type helpers for constructor methods
ncal.pas, tcallnode.gen_self_tree:
  * also use a temp variable for type helper constructors
ncgcal.pas, tcgcallnode.secondcallparan:
  * allow Pointers to be passed as address param if it is the Self value of a type helper extending a pointer type
  * correctly handle the location in case of type helper constructors

+ add tests

git-svn-id: trunk@23580 -
2013-02-06 09:49:35 +00:00
Jonas Maebe
f1ff92529b * group all -CT parameters together
git-svn-id: trunk@23578 -
2013-02-05 23:09:55 +00:00
Jonas Maebe
39e31337f1 * documented -CTthumbinterworking parameter
git-svn-id: trunk@23577 -
2013-02-05 23:09:48 +00:00
florian
3ca7a5ff8e - remove switch -Wx for arm thumb interworking, one should use -CTHUMBTINTERWORKING=ON instead
git-svn-id: trunk@23572 -
2013-02-04 21:46:27 +00:00
florian
cbf7eaaffc * copyright year updated
git-svn-id: trunk@23571 -
2013-02-04 21:33:23 +00:00
florian
d0cbcd419e * update of the German compiler message file by Karl-Michael Schindler, resolves #23728
git-svn-id: trunk@23535 -
2013-01-29 18:34:12 +00:00
sergei
d762ef9e78 + PECOFF targets: support more than 65535 relocations per object section, resolves #23752. DJCOFF targets: give a fatal error, since this object file format does not support extended relocations.
git-svn-id: trunk@23521 -
2013-01-26 16:15:59 +00:00
florian
7184306a4c + option -Wx to generate thumb interworking safe code on arm
git-svn-id: trunk@23463 -
2013-01-20 15:26:59 +00:00
paul
1b8369dd99 compiler: don't allow parameterless constructors
git-svn-id: trunk@23436 -
2013-01-18 01:24:04 +00:00
paul
3a3c10a474 compiler: don't allow constants, methods, class members and properties for local or anonymous records (fixes bug #0023000)
git-svn-id: trunk@23421 -
2013-01-17 09:05:59 +00:00
florian
fce9e953b4 + nested exit support
git-svn-id: trunk@23309 -
2013-01-04 19:09:04 +00:00
Jonas Maebe
6ac8b4fbdf * give a proper error when an mmx/fpu/sse register is used inside a memory
reference (mantis #23441)

git-svn-id: trunk@23152 -
2012-12-15 22:47:16 +00:00
florian
db68214e88 + support setpeoptflags directive, resolves #23447
git-svn-id: trunk@23132 -
2012-12-10 19:17:25 +00:00
Jonas Maebe
2dac1c445a - disabled Stabs support on 64 bit targets (mantis #23365)
* show a warning if an unsupported debug format is selected

git-svn-id: trunk@23056 -
2012-11-24 13:15:58 +00:00
florian
f6109d7c65 * improved error reporting by printing the type being found in with expressions
git-svn-id: trunk@23019 -
2012-11-18 17:09:36 +00:00
Jonas Maebe
cb41d6355c * clarified -Cb explanation (mantis #23308)
git-svn-id: trunk@22982 -
2012-11-12 10:34:00 +00:00
Jonas Maebe
4aa05f5133 + support for automatically generating setters/getters for properties on the
JVM target, since Java bytecode itself has no support for properties and
    hence exposing properties to external Java code can only be done through
    getters/setters. Use the new parameters to do so:
      -CTautogetterprefix=XXX
      -CTautosetterprefix=YYY
    The getter/setter will get the same visibility as the property. If a
    getter/setter with the same naming convention was already specified for a
    property and this getter/setter is declared in the same class as the
    property, then the visibility of this existing getter/setter is
    modified and no new routine is generated.

    Newly generated getters/setters are virtual methods, because that is
    the only way in Java bytecode to allow redefining these getters/setters
    in child classes. However, that also means that using these switches can
    change the behvaviour of code, since normally the used property definition
    is only determined by the declared type of its associated class instance,
    and not by the actual instance type. The compiler will therefore warn when
    such an automatically generated getter/setter is overridden by another
    automatically generated getter/setter in a child class.

git-svn-id: trunk@22959 -
2012-11-08 20:18:08 +00:00
joost
55d03b775e * Within the LaTeX help-text, underscores have to be escaped.
git-svn-id: trunk@22920 -
2012-11-03 17:07:59 +00:00
svenbarth
8a631e9ba8 msg/errore.msg:
added "NativeNT" to target list for i386

git-svn-id: trunk@22882 -
2012-10-30 13:30:53 +00:00
florian
a499a30ca9 * fixes to avx support by Torsten Grundke
git-svn-id: trunk@22773 -
2012-10-19 16:45:53 +00:00
pierre
01c8ac4b3e Fix wrong arg number in pareser_e_nostackframe_with_locals
git-svn-id: trunk@22687 -
2012-10-17 10:52:12 +00:00
pierre
be5839e44a Add warning/error message about possible problems with nostackframe modifier
git-svn-id: trunk@22677 -
2012-10-16 22:42:28 +00:00
florian
283ff05127 * merged avx support in inline assembler developed by Torsten Grundke
git-svn-id: trunk@22568 -
2012-10-06 19:47:18 +00:00
Jonas Maebe
81b50af768 * fixed typo (overring -> overriding)
git-svn-id: trunk@22564 -
2012-10-06 16:22:31 +00:00
Jonas Maebe
eeda54b7eb * fixed copy-paste error in -O4 description
git-svn-id: trunk@22253 -
2012-08-26 21:04:40 +00:00
Jonas Maebe
4d0e4e1b56 * treat "[var + rip]" in intel assembler mode as addr_pic_no_got on x86-64
(mantis #22665)
  + support "[var wrt ..gotpcrel]" nasm/yasm syntax in intel assembler mode
    for GOT-relative accesses on x86-64, + give an error when trying to do
    this on win64 (it doesn't have a GOT)
  * moved code that give a warning when using GOT-relative accesses to
    static data on x86-64 from the AT&T reader to rax86 so it's also
    active for the Intel assembler reader
  + added warning when not using GOT-relative accesses (but plain
    RIP-relative instead) to global data on non-Win64 x86-64

git-svn-id: trunk@22243 -
2012-08-25 15:12:49 +00:00
Jonas Maebe
288d1ec74a * support referencing "result" in nostackframe pure assembler routines if
the result location is a simple location (a single register/reference)
    (mantis #22490)
  * print an error when accessing "result" in a nostack pure assembler routine
    if the result location is not simple

git-svn-id: trunk@22166 -
2012-08-21 19:51:40 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
fb7f25f410 * removed wrong -N switch (switch is not used) description
git-svn-id: trunk@22037 -
2012-08-08 17:02:05 +00:00
Jonas Maebe
aad3ce960a * give an error when trying to give a parameter of a non-simple type a
default value (mantis #22343)
  * give an error when specifying an invalid default value (e.g. a
    floating point number for a longint parameter)

git-svn-id: trunk@22021 -
2012-08-06 20:13:20 +00:00
sergei
684bf4fba2 + Reject object types without VMT as arguments of typeof(). Without this check, an undefined reference to VMT is generated which fails at the linking stage.
git-svn-id: trunk@21923 -
2012-07-17 05:46:55 +00:00
Jonas Maebe
c2be657671 * give an error instead of a note on the JVM target when overriding a
method by one with a lower visibility, because calling the overriding
    method results in a java.lang.AbstractMethodError in that case

git-svn-id: trunk@21839 -
2012-07-10 09:20:11 +00:00
Jonas Maebe
b0462d27cc * by default, no longer initialize enumeration fields of classes/objects
with the enum instance corresponding to ordinal 0 in JVM constructors,
    because a virtual method called by a parent constructor may already
    have assigned a different value (see tests/test/jvm/tenum2.pp). This
    will result in null pointer exceptions when using such fields without
    first explicitly assigning a value to them though.

    The old behaviour can be restored with the new -CTenumfieldinit command
    line parameter

git-svn-id: trunk@21736 -
2012-06-29 21:24:35 +00:00
Jonas Maebe
9f0fb9cf10 - removed "<<<<<<< HEAD" leftover from a conflicting merge
git-svn-id: trunk@21409 -
2012-05-28 12:08:14 +00:00
florian
6c8eed21c4 + implement auto inlining (-Ooautoinline)
+ implement trashing of local variables if subroutine is inlined
* fix some errors releated to interproc. gotos and inlining
+ node_count function
* inline cannot be used with iochecking and safecall calling conventions
* track inherited usage
* don't inline if inherited is used

git-svn-id: trunk@21335 -
2012-05-19 13:30:02 +00:00
Jonas Maebe
958600e74b * by default disable the warning about interfaces raising a particular
method's visibility, because this is common practice in Object-Pascal.
    It can be re-enabled with {$warn INTF_RAISE_VISIBILITY on} (mainly
    useful when trying to keep code compatible with the JVM target)

git-svn-id: trunk@21329 -
2012-05-19 10:19:49 +00:00
paul
d79eee8ed1 compiler: write a warning if unit should be compiled with built-in system codepage for ansistring constants but this codepage is not known by the compiler
git-svn-id: trunk@21269 -
2012-05-10 01:24:18 +00:00
Jonas Maebe
64f3ba3299 * clarified description of -Xd, it is not always required for
cross-compiling (mantis #21963)

git-svn-id: trunk@21248 -
2012-05-06 15:44:52 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00