florian
007df5d0fa
* fix for #36554
...
git-svn-id: trunk@43913 -
2020-01-11 21:15:19 +00:00
florian
4de6b3e6b9
* do not crash when an unsupported code page is encountered, resolves #35581
...
git-svn-id: trunk@43764 -
2019-12-23 21:44:50 +00:00
florian
ac6e4f59c6
* better error recovery, resolves #36397
...
git-svn-id: trunk@43653 -
2019-12-05 20:46:50 +00:00
florian
d8f1aacd78
* better error recovery, resolves #36377
...
git-svn-id: trunk@43612 -
2019-11-29 22:13:17 +00:00
florian
fb4b1cbf35
* warn only in delphi mode if an explicit enumeration value exceeds the range, relaxes r43191
...
git-svn-id: trunk@43590 -
2019-11-25 20:58:20 +00:00
svenbarth
fdeaacac21
* fix for Mantis #36223 : when parsing a helper type its extendeddef might be Nil
...
+ added test
git-svn-id: trunk@43346 -
2019-11-01 15:02:31 +00:00
florian
626ef4ae0c
* give an error if an explicit enumeration valid exceeds the valid range, resolves #34633
...
git-svn-id: trunk@43191 -
2019-10-13 15:48:21 +00:00
svenbarth
beb606be13
* fix for Mantis #36114 : when converting a static class field to a global variable the varspez of the field needs to be respected
...
+ added test
git-svn-id: trunk@43116 -
2019-10-03 16:39:40 +00:00
svenbarth
b0b2218cca
* fix for Mantis #35981 : ensure that the "specialize" token is only really used in non-Delphi modes
...
git-svn-id: trunk@42776 -
2019-08-23 14:59:20 +00:00
Jonas Maebe
3fb7c19482
- removed tests as modern Delphi versions behave differently (mantis #35886 )
...
git-svn-id: trunk@42512 -
2019-07-28 12:03:40 +00:00
svenbarth
6cde8ab4cb
* fix for Mantis #35866 : parse_paras does not check whether the expressions are really constant, so check that manually
...
+ added test
git-svn-id: trunk@42469 -
2019-07-20 19:45:59 +00:00
Jonas Maebe
c038e4c3f2
* relaxation of r42272: again only show warnings rather than errors for
...
out-of-range constants, because of the comments mentioned in #35753
(except for enums, as apparently Delphi does the same)
* added range check warnings about explicit type casts that throw away
bits (e.g. byte($fff)), without giving warnings for most common cases
(like cardinal(-1))
* fixed masking/sign exting constant array indices (must be based on index
range type size/signedness rather than on array size/"signedness")
git-svn-id: trunk@42275 -
2019-06-23 14:12:33 +00:00
Jonas Maebe
3a2fe24f49
* report range errors for assigning out-of-range constants to enums in
...
Delphi mode (mantis #35671 )
* always give an error (rather than only a warning in case range checking
is disabled) when assigning an out-of-range constant to an ordinal variable
whose type does not span the entire range that its bits can hold (because
the result is undefined and FPC's optimisers rely on variables only
holding values that are valid for the type)
git-svn-id: trunk@42272 -
2019-06-22 17:30:42 +00:00
svenbarth
e6add40495
* fix for Mantis #35348 : correctly handle symbols that aren't parameter types (e.g. default values)
...
+ added test
git-svn-id: trunk@41869 -
2019-04-14 20:47:47 +00:00
Jonas Maebe
aba3f8f162
* fixed over-eager rejection of tobjecttype.fieldname expression after r40785
...
(mantis #35149 )
git-svn-id: trunk@41474 -
2019-02-25 21:17:24 +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
svenbarth
04bbfd1746
* fix for Mantis #27378 : save and (more importantly) restore verbosity when switching a unit
...
+ added test
git-svn-id: trunk@40750 -
2019-01-03 20:31:34 +00:00
florian
22365a1f57
+ test for #27543 which is fixed meanwhile
...
git-svn-id: trunk@40731 -
2019-01-01 16:16:54 +00:00
svenbarth
dada756828
* also enable published for TObjA so that the test fails for the correct reason
...
git-svn-id: trunk@40704 -
2018-12-29 19:23:19 +00:00
svenbarth
e28dff523a
* with the change regarding property access lists this test is no longer considered correct
...
git-svn-id: trunk@40658 -
2018-12-26 11:26:08 +00:00
svenbarth
60adebfe28
* Mantis #34691 is fixed by previous change regarding property access list
...
git-svn-id: trunk@40657 -
2018-12-26 11:26:04 +00:00
svenbarth
251dfb6776
* don't allow constants of the record type that is currently being parsed; this would fail as soon as another field is added after the constant declaration
...
+ added tests
Note: unlike what bug report 27880 suggests Delphi also does *NOT* allow this (at least a current Delphi Tokyo) and fails with a "type is not completely defined" error, so this test belongs into the "failure" category
git-svn-id: trunk@40285 -
2018-11-11 22:08:29 +00:00
svenbarth
a8b2ad31d1
* fix for Mantis #34355 : correctly check whether the array constructor is empty (aka []) or not
...
git-svn-id: trunk@39882 -
2018-10-07 12:25:24 +00:00
svenbarth
b94a8c93a5
* test (for Mantis #5516 ; 3531 is the old bug ID) is valid now that we have dynamic array initializers
...
git-svn-id: trunk@39105 -
2018-05-24 19:56:35 +00:00
Jonas Maebe
dfb0869656
+ test that should fail compilation and already fails (mantis #28355 )
...
git-svn-id: trunk@38731 -
2018-04-10 19:34:22 +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
florian
14cb60e479
* set an owner for open array defs being created in property declarations, resolves #25769
...
git-svn-id: trunk@38348 -
2018-02-25 17:36:34 +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
florian
4cb9ad7e01
* patch (indention adapted) by Christo Crause to check avr inline assembler, resolves also #32261
...
git-svn-id: trunk@38286 -
2018-02-18 21:58:04 +00:00
florian
ad4ad82908
* prevent crash on not yet supported attribute declarations, resolves #32075
...
git-svn-id: trunk@38272 -
2018-02-17 19:57:50 +00:00
florian
a29f968b3b
* patch by Christo Crause: generate parameter location information in att assembler mode, resolves #32915
...
* forbid that parameters are subscribed in assembler, if they are references and take more than one register
+ test
git-svn-id: trunk@38125 -
2018-02-05 22:11:00 +00:00
florian
0662b611ca
* patch by Christo Crause: prevent that the compiler converts breq into jmp in inline assembler blocks, resolves #32949
...
git-svn-id: trunk@38088 -
2018-01-31 18:34:42 +00:00
Jonas Maebe
118398a543
* test for mantis #32906 (already fixed in revision 37886)
...
git-svn-id: trunk@37892 -
2018-01-02 18:15:30 +00:00
Jonas Maebe
672afcdca2
* check for conflicts between procedure directives specified in the
...
implementation and "virtual" (if it's a virtual method), as "virtual"
does not get repeated in the implementation and hence no conflicts get
checked by default (mantis #32605 )
git-svn-id: trunk@37887 -
2018-01-01 16:54:04 +00:00
Jonas Maebe
dcac6b9c6f
* disallow passing a dynarray(niln/pointerconstn) as an open array
...
(mantis #31273 )
git-svn-id: trunk@37885 -
2017-12-31 15:18:40 +00:00
florian
4cf2a2672a
changes to fix #32043
...
* changed most of the variables in the assembler readers used to store constants from aint to tcgint
as aint has only the size of the accumular while some CPUs (AVR) allow larger constants in instructions
+ allow access to absolute symbols with address type in inline assembler
* allow absolute addresses in avr inline assembler
+ tests
git-svn-id: trunk@37411 -
2017-10-06 21:07:19 +00:00
svenbarth
c5b33f51f9
* fix for Mantis #32412 : correctly handle an incorrect parameter count for Delete() and Insert() intrinsics
...
+ added tests
git-svn-id: trunk@37342 -
2017-09-27 21:15:00 +00:00
svenbarth
eb9b4fb71f
* fix for Mantis #31973 : resolve dummy symbols earlier and print a nice error message if a generic dummy could not be resolved to an ordinary symbol
...
+ added test
* adjusted test tw9673 which should have never worked as is (what if TList would have been "of T" instead of "of byte"?)
git-svn-id: trunk@36468 -
2017-06-09 14:41:26 +00:00
florian
ad557a1da6
* allow call dword ptr eax in delphi, resolves #18225
...
git-svn-id: trunk@35572 -
2017-03-12 16:37:48 +00:00
svenbarth
ece13bcc5a
* fix for Mantis #31465 : only consider non-static fields when checking whether a record may be used with Default()
...
+ added test (Note: the test fails due to missing = operator, but without the fix there was a stack overflow)
git-svn-id: trunk@35508 -
2017-03-03 17:03:46 +00:00
svenbarth
4742e826f6
+ add test for Mantis #23702 , just to be sure that we don't re-add that already solved problem
...
git-svn-id: trunk@35335 -
2017-01-27 13:58:54 +00:00
Jonas Maebe
048666a25c
* when freeing a procdef that hasn't been registered for writing to the ppu
...
at the end of compiling a unit, also remove it from its owning procsym
in case the procsym does get written to the ppu (possible because you
can have extra overloads in the implementation) (mantis #25283 )
o also fixes webtbf/tw4103 on the platforms where this still failed
(on the platforms where it worked, it worked by accedent since the
compiler was accessing memory of a freed procdef)
git-svn-id: trunk@35309 -
2017-01-15 17:41:27 +00:00
svenbarth
22e579cc74
* fix for Mantis #31107 : disallow calling of ordinary record methods using the record's type.
...
git-svn-id: trunk@35113 -
2016-12-12 22:08:28 +00:00
florian
7bb8873c83
* do not throw an internal error if in case of an previous error the parameter class of an errordef is requested, resolves #31016
...
git-svn-id: trunk@34984 -
2016-11-27 13:16:12 +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
svenbarth
386b7ac154
* fix for Mantis #28753 : don't return generic dummys from single_type(); ensures that parameters correctly evaluate to error defs should generic dummies be used
...
git-svn-id: trunk@34534 -
2016-09-16 20:40:19 +00:00
svenbarth
aaceb5518f
* fix Mantis #30494 by applying patch from Maciej Izak
...
+ added test
git-svn-id: trunk@34381 -
2016-08-26 14:23:23 +00:00
marco
690f784c4d
* enable 40+ tests for Haiku as per mantis #30470
...
git-svn-id: trunk@34312 -
2016-08-14 14:09:24 +00:00