Commit Graph

25 Commits

Author SHA1 Message Date
cooldome
3af7818af4 Fix #12636 (#15850)
* close #11142

* fix #12636

* undo unwanted changes

* fix illegal recursion case
2020-11-05 18:55:52 +01:00
cooldome
fe187719ab fix #15516 (#15518) 2020-10-08 09:12:03 +02:00
Clyybber
1440e70c62 allow packed union (#14868)
Co-authored-by: Arne Döring <arne.doering@gmx.net>
2020-07-01 11:41:03 +02:00
Andreas Rumpf
3ba0c30758 sizeof for empty objects/tuples should be 1; fixes #14690 (#14751) 2020-06-21 19:58:37 +02:00
cooldome
416b4c3612 more on arc codegen (#13178)
* arc codegen for union type

* add more tests

* fix offsetof

* fix tsizeof test

* fix style
2020-01-19 14:14:26 +01:00
Andreas Rumpf
58f3e07b1a fixes and changes the recently introduced 'alignas' to be 'align' (#12666)
* fixes and changes the recently introduced 'alignas' to be 'align'

* more improvements
2019-11-15 20:24:14 +01:00
Arne Döring
0496a666e2 implemented alignas pragma (#12643)
* implemented alignas pragma

* fix bootstrap

* generate c++ compatible syntax for alignas

* Make it work.

* Multiple alignof expressions. Implement top level alignof.
2019-11-13 08:22:41 +00:00
Ridho Pratama
678775601a Fixed sizeOf to sizeof (#12347) 2019-10-03 19:38:37 +02:00
Andreas Rumpf
21fc8b4d4d refactor sizealignoffset (#12077)
* small refactoring
* refactor computeObjectOffsetFoldFunction with AccumObject
* refactor packed object offstes fold function
* refactor compute union object offsets fold function
* merge normal/packed object offset fold function
* compiletime offsetof in c++ inheritance objects
* enable c++ inheritance offsetof tests
* correct alignment for big sets/enums on weird 32bit platforms
* uncomputedSize -> unknownSize
* workaround for travis
* fixes win32 alignment problems
2019-08-28 19:36:29 +02:00
Arne Döring
11dad688fe Offsetof fixes (#11690)
* first fixes

* more tests and fixes

* code normalization
2019-07-09 09:07:45 +02:00
Arne Döring
20d0ef8afb [backport] fix #11320 (#11538)
* [backport] fix #11320
* fix test for 32 bit test
2019-07-03 08:00:40 +02:00
Arne Döring
188870648a sizeof alignof offsetof macros api (#10855) 2019-03-19 08:23:00 +01:00
Arne Döring
2c01f0ad8d tsizeof test is now correct (#10788) 2019-03-06 08:12:16 +01:00
Arne Döring
1d9b88f25d sizealign of union type (#10780)
* sizealign of union type

* add error message for packed union
2019-03-04 09:19:38 +01:00
Arne Döring
28394153ab 32 bit fixes (#10608) 2019-02-13 23:30:14 +01:00
Arne Döring
abad758a7e Fix for sizeof bitsize combination (#10227)
* fix #10082

* added test
2019-01-07 18:09:57 +01:00
Andreas Rumpf
062d7e3a39 fixes #10082 2018-12-30 02:45:43 +01:00
Andreas Rumpf
2fd522cf58 use anon structs and unions for a much better debug experience (#10055) 2018-12-20 11:44:26 +01:00
Arne Döring
1e08fff2d5 bitsize respected in size calculation. (#9756) 2018-11-19 13:48:40 +01:00
Arne Döring
5dfcc4e91c make tsizeof run on C++ backend (#9734) 2018-11-18 14:36:20 +01:00
Arne Döring
1ec5c6fdf5 Sizeof alignof fixes (#9568)
fixes #9545
2018-10-30 16:41:06 +01:00
Timothee Cour
745f1642d6 implement sizeof and alignof operator (manually squashed #5664) (#9356) 2018-10-14 00:52:28 +02:00
cooldome
404f0d64af Add sizeof for arrays of integral types (#8445) 2018-07-30 11:00:06 +02:00
Adam Strzelecki
e80465dacf tests: Trim .nim files trailing whitespace
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:04:32 +02:00
Andreas Rumpf
a690e7b267 Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
2014-04-09 22:56:18 +02:00