Commit Graph

490 Commits

Author SHA1 Message Date
Michael VAN CANNEYT
f364bb6b11 * Forbid use of string alias in system unit 2023-07-22 08:26:22 +00:00
Pierre Muller
c38cc828e8 Add new test code to verify that tentfile.buf limits are not overpassed 2023-05-23 22:39:03 +02:00
Pierre Muller
aaf356ba9f Avoid read past buffer end for empty source when checking for utf-8 signature 2023-04-12 20:10:44 +02:00
florian
488c389b9b + support FILEEXISTS(...) in preprocessor expressions, resolves #39527
+ tests
  * tscannerfile.readpreproc sets preproc_pattern correctly for quoted strings
2023-03-20 23:17:09 +01:00
florian
ece59f2534 * also count the use of enum syms in preprocessor expressions correctly 2023-02-16 23:02:47 +01:00
florian
8ef0f59025 * mark constant symbols used in preprocessor expressions as used, resolves #40108 2023-01-24 22:36:26 +01:00
Sven/Sarah Barth
188cac3bc6 * enable OpenStrings by default in mode Delphi
+ added test
2022-10-08 13:52:34 +02:00
florian
dbbb91705f * improved fix for #39912 2022-09-23 21:56:24 +02:00
florian
af1194de4d * end of an include file works like a new line with regard to single line (//) comments, resolves #39912 2022-09-19 23:03:36 +02:00
Jonas Maebe
b0e1867b4c symcreat: support for scanner/parser escape sequences
Support escape sequences when parsing internally generated code. Used for now
to force interpreting certain identifiers as unit/namespace identifiers.
2022-09-16 11:21:05 +02:00
florian
8363c48863 * patch by rika: simplify tscannerfile.readstring, resolves #39835 2022-07-12 22:12:23 +02:00
Pierre Muller
5acd7a7b83 Rename tsymtable.insert and delete methods to insertsym ands deletesym 2022-05-03 23:00:28 +02:00
Karoly Balogh
ff68e7b9de * m68k-atari: override the exeext globally, not just at the final step of the linking. this fixes 'Linking <exename>.ttp' messages, when in fact <exename>.prg gets generated 2022-02-14 15:33:36 +01:00
florian
2a93e65511 * seperator => separator 2022-01-02 13:12:33 +01:00
florian
d2447026de + modeswitch UNDERSCOREISSEPERATOR, active by default in delphi modes:
support _ as seperator in numbers, it is ignored while reading them, resolves #39504
2022-01-01 23:28:36 +01:00
Florian Klämpfl
25eab57a58 * allow %... for binary constants in delphi mode, resolves #39503 2021-12-29 15:37:53 +01:00
florian
e4ee8fa6a2 * patch by Rika to pass some strings by reference, resolves #39338 2021-11-09 22:41:52 +01:00
florian
dcb1fcd9b8 + support $lgeacyifend directive, resolves #37676 2021-11-01 23:24:42 +01:00
florian
ff3acfb8cd * cleanup of 2.7.0 defines 2021-10-31 13:20:28 +01:00
florian
77cc2f4ced * decrease macro nesting counter early when expanding empty macro
to avoid errors about too depth macro nesting, resolves #38802

git-svn-id: trunk@49265 -
2021-04-25 19:49:26 +00:00
Jonas Maebe
ff3f812d97 * fix conversion of true/false macro definitions to boolean values
(mantis #38492)
   o since the macro lookups are recursive, "mac" will usually be nil
     afterwards (unless we found an undefined macro)

git-svn-id: trunk@49160 -
2021-04-10 10:56:02 +00:00
florian
9803318fef * give a proper error if macros are too deeply nested
git-svn-id: trunk@48357 -
2021-01-23 21:29:37 +00:00
svenbarth
a8d316d187 + add method to retrieve an integer expression from the scanner
git-svn-id: trunk@47601 -
2020-11-26 20:13:34 +00:00
Jonas Maebe
38a059f039 * give an error when trying to define a macro/compiler variable with
an empty name

git-svn-id: trunk@47300 -
2020-11-03 21:34:19 +00:00
florian
5b06af8886 * delphi has excessprecision turned on by default
git-svn-id: trunk@47245 -
2020-10-28 21:37:26 +00:00
florian
9ea52b8578 + new switches -DD and DT which allow to pass an arbitrary string which is used by %DATE%/%TIME%
git-svn-id: trunk@47132 -
2020-10-18 17:13:38 +00:00
florian
e83d214e98 + allow in ISO mode that { ... } and (* ... *) comments are paired, resolves at least partly #37428
git-svn-id: trunk@46903 -
2020-09-20 08:47:00 +00:00
yury
154ada9e86 * 8086: enable cs_force_far_calls when m_nested_procvars is enabled.
* 8086: when the compiler mode switches to a non-TP mode, enable cs_force_far_calls.

git-svn-id: trunk@46454 -
2020-08-16 10:34:23 +00:00
yury
f7d14128b5 * 8086: Do not force far calls in the TP mode by default. This is TP compatible. Other modes need forced far calls by default in order to compile non-TP code.
git-svn-id: trunk@46433 -
2020-08-14 16:56:13 +00:00
svenbarth
bd01182ff0 * add support for AND, OR, XOR and NOT of integer values in preprocessor directives (Delphi allows that as well)
+ added test

git-svn-id: trunk@45053 -
2020-04-24 14:09:04 +00:00
svenbarth
ae2801c707 * use asInt64 instead of asInt to evaluate an Integer expression
git-svn-id: trunk@45052 -
2020-04-24 14:09:02 +00:00
svenbarth
bffe99f59f + add an asInt64 to texprvalue
git-svn-id: trunk@45051 -
2020-04-24 14:09:00 +00:00
svenbarth
4f16473baa * fix typo
git-svn-id: trunk@44747 -
2020-04-17 14:44:16 +00:00
pierre
d1e4066477 Hopefully fix problems related to loading of ppufile generated with other endianess for generics
git-svn-id: trunk@44056 -
2020-01-28 23:43:56 +00:00
svenbarth
562d345060 * fix for Mantis #36121: define FPC_ISO and FPC_EXTENDEDPASCAL for modes ISO and EXTENDEDPASCAL respectively
git-svn-id: trunk@43114 -
2019-10-03 12:34:36 +00:00
florian
5947143d8f * intel asm reader: try to read avx512 extensions only if the instruction supports them
* cleanup

git-svn-id: trunk@42656 -
2019-08-12 10:46:19 +00:00
florian
f883dd6dbb Synchronized with trunk, part 2 (make all works, avx-512 support not yet tested, no regression testing yet)
git-svn-id: branches/tg74/avx512@42643 -
2019-08-10 19:38:35 +00:00
florian
746bfced25 Synchronized with trunk, part 1 (only make cycle tested, make all is broken, avx-512 support not yet tested
git-svn-id: branches/tg74/avx512@42642 -
2019-08-10 13:53:20 +00:00
pierre
70b2904c48 * Issue file change before line and column change in token writes to allow for better display in ppudump utility
git-svn-id: trunk@42601 -
2019-08-08 06:26:40 +00:00
pierre
92f085fdd9 Try to fix bug introduced in previous commit #42527, hopefully fixing bug report 35902
git-svn-id: trunk@42528 -
2019-07-29 11:54:27 +00:00
pierre
f2b200e4f0 Fix recordtoken writing into ppu files to allow correct
handling in cross-configuration with different endianess.

  The code has been modified to use the same scheme as the writing of
  the other parts of the ppu, i.e. change_endian filed has been
  added also to tscannerfile class of scanner unit.
  This field is then used to swap values that required endianess
  conversion.

  * scanner.pas: change_endian filed added to tscannerfile class.
    The value of this field is set as the same field in tentryfile class of entfile unit.
    Token read and write methods converted to use change_endian field.

  * ppu.pas: Increase CurrentPPILongVersion

  * utils/ppuutils/ppudump.pp: Remove unneeded FPC_BIG_ENDIAN code
    which was needed because tokens were previously written using a
    different rule.

git-svn-id: trunk@42527 -
2019-07-29 05:33:00 +00:00
pierre
8d4588e1b2 Fix compilation of compiler with -dPREPROCWRITE
git-svn-id: trunk@42084 -
2019-05-16 12:17:32 +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
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
bde560dac2 * also accept {$elsif} after {$if(n)def} (mantis #34858)
git-svn-id: trunk@41724 -
2019-03-17 15:20:22 +00:00
Jonas Maebe
ba22fe74c7 * don't corrupt the assembler reader mode on i386 and i8086 if the syntax
mode is set to something else but Delphi on the command line

git-svn-id: trunk@41422 -
2019-02-23 16:03:25 +00:00
Jonas Maebe
dee1056546 * fixed wrong change of jumpalignmax from 10 to 16 in previous commit
o renamed jumpalignmax and coalescealignmax to jumpalignskipmax/
     coalescealignskipmax to better reflex the meaning of these setting
     (and the difference in meaning to e.g. constalignmax)

git-svn-id: trunk@40682 -
2018-12-28 13:22:50 +00:00
florian
0d50a63c7d + tsettings.tlsmodel
git-svn-id: trunk@40271 -
2018-11-07 22:03:01 +00:00
florian
a092da723a + new fields for more precise control of alignment
+ support of new alignment control values for GNU AS writer
+ support of new alignment control values for binary writer
* better alignment settings on i386-win32
* improved inserted align directives for if nodes

git-svn-id: trunk@40159 -
2018-11-01 20:49:17 +00:00
Jonas Maebe
0b246f3dbd * converted Boolean8 to an internal type, and mapped Boolean to the
new internal pasbool1(type) (part of mantis #34411)
   o apply the _Bool x86-64 parameter passing rules only to pasbool1

git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00