Skip to content

Commit a454f9e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents ad08f9a + d6bbb19 commit a454f9e

33 files changed

+556
-283
lines changed

articles/ctod.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ $(H2 $(LNAME2 sort, Sorting arrays))
11961196

11971197
$(H4 The C Way)
11981198

1199-
Although many C programmers tend to reimplmement bubble sorts
1199+
Although many C programmers tend to reimplement bubble sorts
12001200
over and over, the right way to sort in C is to use qsort():
12011201

12021202
$(CCODE

articles/faq.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ $(ITEM real, What is the point of 80 bit reals?)
360360
to be done, especially when adding together large numbers of small
361361
real numbers. Prof. Kahan, who designed the Intel floating point
362362
unit, has an eloquent
363-
<a href="http://http.cs.berkeley.edu/~wkahan/JAVAhurt.pdf">paper</a>
363+
<a href="https://people.eecs.berkeley.edu/~wkahan/JAVAhurt.pdf">paper</a>
364364
on the subject.
365365

366366
$(ITEM anonymous, How do I do anonymous struct/unions in D?)

book/dlang.org.ddoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,8 @@ $(SUBMENU_MANUAL
269269
$(SUBMENU_LINK irc://irc.libera.chat/d, IRC)
270270
$(SUBMENU_LINK https://discord.gg/bMZk9Q4, Community Discord)
271271
$(SUBMENU_LINK https://wiki.dlang.org, Wiki)
272-
$(SUBMENU_LINK_DIVIDER https://github.com/dlang, GitHub)
273-
$(SUBMENU_LINK $(ROOT_DIR)bugstats.html, Issues)
274-
$(SUBMENU_LINK https://wiki.dlang.org/Get_involved, Get involved)
272+
$(SUBMENU_LINK_DIVIDER $(ROOT_DIR)bugstats.html, Issues)
273+
$(SUBMENU_LINK $(ROOT_DIR)contributing.html, Contributing)
275274
$(SUBMENU_LINK_DIVIDER $(ROOT_DIR)foundation/contributors.html, Contributors)
276275
$(SUBMENU_LINK $(ROOT_DIR)foundation/index.html, Foundation)
277276
$(SUBMENU_LINK $(ROOT_DIR)/security.html, Security Team)

bugstats.dd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ $(P
99
)
1010

1111
$(P
12-
You can browse through the existing bugs for D projects $(LINK2 https://issues.dlang.org/describecomponents.cgi?product=D, $(B here)).
12+
You can browse through the existing bugs by project $(LINK2 https://issues.dlang.org/describecomponents.cgi?product=D, $(B here)).
1313
)
1414

1515
$(P
1616
If you want to search for a specific bug, you can use the $(LINK2 https://issues.dlang.org/query.cgi?format=specific, $(B search page)).
1717
)
1818

1919
$(P
20-
And if you want to file a new bug, you can use $(LINK2 https://issues.dlang.org/enter_bug.cgi?product=D, $(B this page)).
20+
And if you want to file a new bug, you can use $(LINK2 https://issues.dlang.org/enter_bug.cgi?product=D, $(B this page)),
21+
but please $(HTTPS github.com/dlang/dmd/blob/master/CONTRIBUTING.md#reporting-bugs, check the guidelines) first.
2122
)
2223

2324
$(H3 Bug Tracker Statistics)

changelog/2.082.0.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ from the Objective-C runtime can be used instead [2].
309309
)
310310

311311
$(P
312-
[1] $(LINK2 Fragile Binary Interface Problem, https://en.wikipedia.org/wiki/Fragile_binary_interface_problem)
313-
[2] $(LINK2 Objective-C Runtime, https://developer.apple.com/documentation/objectivec/objective_c_runtime)
312+
[1] $(LINK2 https://en.wikipedia.org/wiki/Fragile_binary_interface_problem, Fragile Binary Interface Problem)
313+
[2] $(LINK2 https://developer.apple.com/documentation/objectivec/objective_c_runtime, Objective-C Runtime)
314314
)
315315
)
316316

changelog/2.095.0.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ This deprecation will become an error in 2.105.
228228
$(LI $(LNAME2 extern-pascal,`extern(Pascal)` has been removed)
229229
$(CHANGELOG_SOURCE_FILE dmd, changelog/extern-pascal.dd)
230230
$(P
231-
This unused linkage was deprecated in $(LINK2 v2.084.0, https://dlang.org/changelog/2.084.0.html#deprecated_extern_pascal) and has now been removed.
231+
This unused linkage was deprecated in $(LINK2 https://dlang.org/changelog/2.084.0.html#deprecated_extern_pascal, v2.084.0) and has now been removed.
232232
)
233233
)
234234

changelog/2.097.0.dd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ All public symbols are still accessible using `std.math` as usual.
546546
$(LI $(LNAME2 splitwhen,splitWhen added to std.algorithm.iteration)
547547
$(CHANGELOG_SOURCE_FILE phobos, changelog/splitwhen.dd)
548548
$(P
549-
$(REF splitWhen, std, algortihm, iteration) is a variant of the existing $(REF
550-
chunkBy, std, algortihm, iteration) function that does not require its predicate
549+
$(REF splitWhen, std, algorithm, iteration) is a variant of the existing $(REF
550+
chunkBy, std, algorithm, iteration) function that does not require its predicate
551551
to be an equivalence relation, allowing it to be used in ways that chunkBy
552552
cannot. For example:
553553
)

changelog/2.101.0.dd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $(LI $(RELATIVE_LINK2 dmd.deprecate_throwing_nothrow_contracts,Throwing from con
2020
$(LI $(RELATIVE_LINK2 dmd.deprecate_version_int,Using integers for `version` or `debug` conditions has been deprecated))
2121
$(LI $(RELATIVE_LINK2 dmd.dip1000_deprecation_warnings,Print deprecations for `scope` pointer errors))
2222
$(LI $(RELATIVE_LINK2 dmd.dtoh-improvements,Improvements for the C++ header generation))
23-
$(LI $(RELATIVE_LINK2 dmd.fix-immutable-conv,`-preview=fixImmmutableConv` has been added))
23+
$(LI $(RELATIVE_LINK2 dmd.fix-immutable-conv,`-preview=fixImmutableConv` has been added))
2424
$(LI $(RELATIVE_LINK2 dmd.fix22134,Returning a discarded void value from a function is now deprecated))
2525
$(LI $(RELATIVE_LINK2 dmd.importc_typeof,ImportC now recognizes the `typeof(...)` operator))
2626
$(LI $(RELATIVE_LINK2 dmd.markdown,Removed the `-transition=markdown` and `-revert=markdown` switches))
@@ -270,10 +270,10 @@ Note: The header generator is still considered experimental, so please submit
270270
)
271271
)
272272

273-
$(LI $(LNAME2 dmd.fix-immutable-conv,`-preview=fixImmmutableConv` has been added)
273+
$(LI $(LNAME2 dmd.fix-immutable-conv,`-preview=fixImmutableConv` has been added)
274274
$(CHANGELOG_SOURCE_FILE dmd, changelog/dmd.fix-immutable-conv.dd)
275275
$(P
276-
The compiler allows implicitly converting a return value with indirections to immutable if it determines the result must be unique.
276+
The compiler allows implicitly converting a return value with indirections to immutable if it determines the result is unique.
277277
Formerly, this check would inspect the types of the indirections, and forget to take into account conversions, such as `int[]` to `void[]`:
278278
)
279279

@@ -296,7 +296,7 @@ void main()
296296
$(P
297297
This was filed as [issue 15660](https://issues.dlang.org/show_bug.cgi?id=15660), which has been fixed some time ago by making the check more strict: the called function must be strongly pure.
298298
However, to avoid breaking code, the fix was only active with the `-preview=dip1000` switch.
299-
Since it is unrelated to dip1000 (which is about `scope` pointers), the fix has been moved to a new `-preview=fixImmmutableConv` switch.
299+
Since it is unrelated to dip1000 (which is about `scope` pointers), the fix has been moved to a new `-preview=fixImmutableConv` switch.
300300
)
301301
)
302302

changelog/2.105.0.dd

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ $(CHANGELOG_NAV_INJECT)
55
$(VERSION Aug 01, 2023, =================================================,
66

77
$(CHANGELOG_HEADER_STATISTICS
8-
$(VER) comes with 11 major changes and 59 fixed Bugzilla issues.
8+
$(VER) comes with 12 major changes and 59 fixed Bugzilla issues.
99
A huge thanks goes to the
1010
$(LINK2 #contributors, 34 contributors)
1111
who made $(VER) possible.)
@@ -18,6 +18,7 @@ $(LI $(RELATIVE_LINK2 dmd.enum-function,Functions can no longer have `enum` stor
1818
$(LI $(RELATIVE_LINK2 dmd.extern-c-overload,Overloading `extern(C)` functions is now an error))
1919
$(LI $(RELATIVE_LINK2 dmd.private-deprecation-error,Deprecation phase ended for access to private method when overloaded with public method.))
2020
$(LI $(RELATIVE_LINK2 dmd.visionos-version-identifier,Added predefined version identifier `VisionOS`))
21+
$(LI $(RELATIVE_LINK2 dmd.allow-parentheses-for-call,Do not error with a C cast when surrounding a type or expression in parentheses when calling or constructing.))
2122

2223
)
2324

@@ -174,6 +175,30 @@ This is Apple's new operating system for their VR/AR device Vision Pro.
174175
)
175176
)
176177

178+
$(LI $(LNAME2 dmd.allow-parentheses-for-call,Do not error with a C cast when surrounding a type or expression in parentheses when calling or constructing.)
179+
$(P
180+
Previous to this version, an expression like `(IdentifierOrBasicType)(Expression)` would be considered a c-style cast,
181+
and disallowed, even if the `IdentifierOrBasicType` could be used as a callable. This is now allowed, as long as the expression is a call, or a construction.
182+
183+
```
184+
struct S { int x; }
185+
int foo(int x) { return x; }
186+
auto bar = &foo;
187+
188+
// these were previously disallowed
189+
auto s = (S)(5); // equivalent to S(5)
190+
auto f = (foo)(5); // equivalent to foo(5)
191+
auto b = (bar)(5); // equivalent to bar(5)
192+
auto i = (int)(5); // equivalent to int(5), not a cast.
193+
194+
// these are not allowed
195+
auto bad = (int)5; // Error: C style cast illegal, use `cast(int)5`
196+
auto bad2 = (ubyte)(12345); // Error: cannot implicitly convert expression `12345` of type `int` to `ubyte`
197+
```
198+
)
199+
200+
$(P See $(BUGZILLA 24025): Expressions contained in parentheses should not be assumed to be C casts)
201+
)
177202

178203
)
179204

contributing.dd

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Ddoc
2+
3+
$(D_S Contributing,
4+
5+
$(NOTE To search the bug tracker or report issues, see $(LINK2 bugstats.html, Issues).)
6+
7+
$(H2 $(LNAME2 github, GitHub Projects))
8+
9+
* $(LINK2 https://github.com/dlang, dlang) - dmd, phobos, dub, dlang.org etc
10+
* $(LINK2 https://github.com/dlang-community, dlang-community) - dfmt, dscanner etc
11+
12+
13+
$(H2 $(LNAME2 see-also, Getting Started))
14+
15+
* Please read: $(LINK2 https://github.com/dlang/dmd/blob/master/CONTRIBUTING.md#solving-bugs--submitting-pull-requests,
16+
Solving bugs / Submitting pull requests)
17+
* Get involved: $(HTTPS wiki.dlang.org/Get_involved)
18+
19+
)
20+
21+
Macros:
22+
TITLE=Contributing

0 commit comments

Comments
 (0)