Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dmd-cxx] Backport fixes for issue 18143 and 18719. #12153

Merged
merged 3 commits into from
Jan 25, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jan 25, 2021

Last couple of problems found when testing druntime bindings in master.

ibuclaw and others added 3 commits January 25, 2021 09:15
The reserve() member function already handles setting the stack array on
the first index assignment.  Setting the default values in this way
aligns the implementation with the D version.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
18143 normal in/out contracts should be implicitly 'this' const
18719 normal Doubly-called constructor against member when using forwarding constructors

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "dmd-cxx + dmd#12153"

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 25, 2021

std/file.d(213): Error: immutable field 'errno' initialized multiple times
std/file.d(213): Error: immutable field 'errno' initialized multiple times

Oh yes, I forgot I also fixed phobos as well. :-)

@RazvanN7
Copy link
Contributor

RazvanN7 commented Jan 25, 2021

Maybe force push to restart DMD C++?

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 25, 2021

Maybe force push to restart DMD C++?

The auto-tester does it automatically. The Github test runners can be manually re-ran from the checks page.

@RazvanN7
Copy link
Contributor

Weird. I can re-run all other CirrusCI tests, but it seems I do not have rights for DMD C++ tests.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jan 25, 2021

Weird. I can re-run all other CirrusCI tests, but it seems I do not have rights for DMD C++ tests.

Can you see a "Cancel workflow" button? In the event of a finished build, that will change into a "Re-run job" button.

@dlang-bot dlang-bot merged commit d2d4ce5 into dlang:dmd-cxx Jan 25, 2021
@ibuclaw ibuclaw deleted the dmd-cxx-bugfix branch January 25, 2021 12:36
kraj pushed a commit to kraj/gcc that referenced this pull request Jan 26, 2021
D front-end changes:

 - Contracts for pre- and postconditions are now implicitly "this"
   const, so that state can no longer be altered in these functions.

 - Inside a constructor scope, assigning to aggregate declaration
   members is done by considering the first assignment as initialization
   and subsequent assignments as modifications of the constructed
   object.  For const/immutable fields the initialization is accepted in
   the constructor but subsequent modifications are not.  However this
   rule did not apply when inside a constructor scope there is a call to
   a different constructor.  This been changed so it is now an error
   when there's a double initialization of immutable fields inside a
   constructor.

Phobos changes:

 - Don't run unit-tests for unsupported clocks in std.datetime.  The
   phobos and phobos_shared tests now add -fversion=Linux_Pre_2639 if
   required.

 - Deprecate public extern(C) bindings for getline and getdelim in
   std.stdio.  The correct module for bindings is core.sys.posix.stdio.

Reviewed-on: dlang/dmd#12153
	     dlang/phobos#7768

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 609c3ce2d.
	* d-compiler.cc (Compiler::loadModule): Rename to ...
	(Compiler::onParseModule): ... this.
	(Compiler::onImport): New function.
	* d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.

libphobos/ChangeLog:

	* src/MERGE: Merge upstream phobos 3dd5df686.
	* testsuite/libphobos.phobos/phobos.exp: Add compiler flag
	-fversion=Linux_Pre_2639 if target is linux_pre_2639.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants