Commit graph

21962 commits

Author SHA1 Message Date
Martin Kinkelin
ff698ba103 Convert posix.mak to generic Makefile
Usable on Windows too, with a GNU make.
2023-12-09 15:59:14 +01:00
Martin Kinkelin
c847abc42a Remove deprecated compiler Makefiles 2023-12-09 15:59:14 +01:00
Iain Buclaw
f382114888 Makefile: stub out all auto-tester-build and auto-tester-test recipes 2023-01-03 01:23:03 +02:00
Iain Buclaw
09d04945bd Fix build script paths to work with new merged repository structure
Co-Authored-By: Geod24 <pro.mathias.lang@gmail.com>
Co-Authored-By: Martin Kinkelin <noone@nowhere.com>
Co-Authored-By: Vladimir Panteleev <git@cy.md>
2022-07-09 23:49:27 +02:00
Iain Buclaw
6374bb87b7 Move dmd files into compiler/ 2022-07-09 18:53:07 +02:00
Iain Buclaw
b7b29ca161 Merge remote-tracking branch 'upstream/stable' into merge_stable 2022-07-09 17:05:59 +02:00
Walter Bright
04d189077c
use clang -E for preprocessing on OSX (#14278) 2022-07-09 00:33:55 -07:00
RazvanN7
2c336dfa82 Fix Issue 21443 - scope (failure) with a return breaks safety 2022-07-07 14:18:10 +00:00
Dennis Korpel
53955b6fe0 Fix 23216 - Better error message for foreach_reverse without Bidirectional Range 2022-07-07 14:16:13 +00:00
The Dlang Bot
f81bdf530a
Merge pull request #14272 from Geod24/overload-match
Fix 18973, 9161 - TypeInfo generation does not account for `@disable`

Signed-off-by: Nicholas Wilson <thewilsonator@users.noreply.github.com>
Merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2022-07-07 10:16:13 +00:00
Iain Buclaw
81e4682f72
fix Issue 22134 - Deprecate returning a discarded void value from a function (#12898)
fix Issue 22134 - Deprecate returning a discarded void value from a function

Signed-off-by: Martin Kinkelin <kinke@users.noreply.github.com>
Signed-off-by: Razvan Nitu <RazvanN7@users.noreply.github.com>
Merged-on-behalf-of: unknown
2022-07-07 06:19:04 +00:00
Geod24
4df133b574 Fix 9161 - Linker error if struct has disabled dtor 2022-07-07 07:04:25 +02:00
Geod24
22e4aecb13 Fix 18973 - TypeInfo generation does not account for @disable
This changes `overloadExactMatch` as all 14 usages of it are to find
functions that can later be called.
2022-07-07 06:40:24 +02:00
Brian Callahan
fca5a6de2b Fix Issue 23225 - OpenBSD: cpp invocation cannot find files
A bug in the shell script that lives in /usr/bin/cpp eats the -o
flag in the CPP invocation, which breaks ImportC. This workaround
is to use /usr/libexec/cpp instead, which is the actual CPP binary.
2022-07-04 13:26:40 +00:00
Walter Bright
a33e88cb07 remove memory corruption bug from cparse.d 2022-07-04 05:43:01 +00:00
Iain Buclaw
8d433e7b9c build.d: Ignore non-release version tags in dmd 2022-07-03 19:44:47 +00:00
Dennis Korpel
c3c54dd964 Use isAggregate in parameterStorageClass 2022-07-03 17:43:01 +00:00
Brian Callahan
483eb2dcfa OpenBSD needs -o in its cpp invocation 2022-07-01 16:01:35 +00:00
Dennis Korpel
4513d32447 Use FileName.equals when comparing ddoc_ext 2022-06-30 23:36:01 +00:00
Walter Bright
59e2a80549 fix Issue 23224 - ImportC: memory model switch is not passed to C preprocessor 2022-06-30 09:58:12 +00:00
Walter Bright
fc2ca1d6a6
fix Issue 23217 - ImportC: extra initializer(s) error for array of structs (#14258) 2022-06-30 00:41:31 -07:00
mhh
48415b4d22 Fix Issues 23223, 23222 - Special case modules when printing symbols that aliases point to. 2022-06-30 06:34:19 +08:00
Walter Bright
8dfa63820a fix remaining problem with multi-statement inlining 2022-06-28 16:02:59 -07:00
Walter Bright
9e8211541f fix remaining problem with multi-statement inlining 2022-06-28 11:15:21 -07:00
Dennis Korpel
5e0389d5fa Remove _d_delXXX RTSLYM members 2022-06-27 19:10:16 +02:00
Dennis Korpel
b381bcd789 Remove RTLSYM.DSWITCHERR 2022-06-27 15:20:01 +02:00
Dennis Korpel
2cbbd99836 Remove unused RTLSYM entries 2022-06-27 14:14:30 +02:00
Iain Buclaw
6c4d2c44a3 dmd.cpreprocess: Internalize the looking up of cppswitches 2022-06-26 01:58:46 +00:00
Walter Bright
6ede0f5089 fix Issue 23206 - ImportC: __declspec(noreturn) does not compile 2022-06-26 01:58:37 +00:00
Dennis Korpel
a9b11459e7 Improve error for using in operator on arrays
Co-authored-by: Max Haughton <maxhaton@gmail.com>
2022-06-25 23:32:55 +00:00
Walter Bright
6f2a4daeba fix Issue 22724 - ImportC: VC extension __pragma(pack) is not implemented 2022-06-25 06:39:59 +00:00
Iain Buclaw
44efba14c1
Merge branch 'master' into tupdecl_varexp 2022-06-24 16:27:40 +02:00
Boris Carvajal
5e981f08a5 Fix Issue 23010 - mixed in aliaseqs used as type don't initialize
`TupleDeclaration` elements were inserted to the `members` array of
current `ScopeDsymbol` but `TemplateMixin` declarations are already
expanded in statement level and this confused DMD backend.
After adding some code to insert tuple elements to `AggregateDeclaration.fields`
and for parsing tuples in `toObjFile`, the code in question can be removed.
No more hidden symbols (like `__tuple_field_0`) inside any `members` field.
2022-06-24 13:47:00 +00:00
Iain Buclaw
e3a6de977d ImportC: Check a few more cases of register variables having their address taken 2022-06-24 12:52:41 +00:00
Boris Carvajal
b957417826 dtoh: Use fields instead of members to generate default constructors 2022-06-24 06:59:34 +00:00
Boris Carvajal
8c87b0d968
Replace DsymbolExp with VarExp when creating TupleDeclaration variables 2022-06-24 01:43:12 -04:00
Boris Carvajal
bfea47d8eb Add TupleDeclaration.foreachVar helper to loop over its variables 2022-06-24 04:30:41 +00:00
Iain Buclaw
d25b78d47c ImportC: Implement semantic support for register variables 2022-06-24 00:39:26 +00:00
Iain Buclaw
c54c8a18e7 dmd.cparse: Test invalid combinations of storage and function specifiers 2022-06-23 20:46:56 +00:00
Dennis Korpel
5d5fe27b8a Fix 23168 - return scope wrongly rewritten for structs with no indirections 2022-06-23 09:36:31 +00:00
Dennis Korpel
3c1bfdcea7 root/filename.d: improve @safe usage 2022-06-23 09:06:42 +00:00
Boris Carvajal
1e43256d6d Fix Issue 23205 - Can't declare mixin template inside a function 2022-06-23 08:56:17 +00:00
Walter Bright
cc70613e77 fix Issue 23207 - dmd hangs compiling druntime/src/core/stdc/errno.c 2022-06-23 08:52:53 +00:00
Dennis Korpel
b524201435 Fix 23169 - Mangling does not distinguish return and return scope 2022-06-22 21:42:41 +00:00
Dennis Korpel
6203135dcf Fix 23167 - inaccurate diagnostic for internal tuple bound violation 2022-06-22 01:15:11 +00:00
Geod24
b3cc517966 Allow -preview=in only with extern(D|C++)
The intent of `-preview=in` is to make `in` the go-to storage class for input parameters in D.
However it is D centric, as it is an enhanced version of `scope const ref`.
As non-`extern(D)` functions usually are expected to match a specific ABI,
using `in` is hardly a good idea.

However, as C++, also have a "go to" storage class for input parameters (`const T&`),
`in` can also be applied on `extern(C++)` function in order to bind to `const T&` parameters.
This also allows to expose a closer API for a function than via `const ref`,
as `in` will allow to bind rvalues to `const T&`, as in C++.
2022-06-20 12:56:14 +00:00
Walter Bright
37436a4446 inline multiline functions 2022-06-20 04:28:32 +00:00
Boris Carvajal
10f612d3bc Fix Issue 23172 - [REG2.100] Wrong cast inserted for ternary operator and non-int enums 2022-06-18 09:46:36 +00:00
Boris Carvajal
16285cf542 Fix Issue 23192 - Can't iterate aggregate fields with static foreach inside a member function 2022-06-18 09:01:27 +00:00
Iain Buclaw
ee0bd218b3
ImportC: Fix member value fits integer check (#14225) 2022-06-17 11:24:57 +03:00