Skip to content

make outbuffer printf nothrow#7421

Merged
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:outbuffer-nothrow
Jul 3, 2018
Merged

make outbuffer printf nothrow#7421
dlang-bot merged 1 commit intodlang:masterfrom
WalterBright:outbuffer-nothrow

Conversation

@WalterBright
Copy link
Member

No description provided.

@dlang-bot
Copy link
Contributor

dlang-bot commented Dec 11, 2017

Thanks for your pull request, @WalterBright!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

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

dub fetch digger
dub run digger -- build "master + dmd#7421"

@WalterBright
Copy link
Member Author

This is failing because va_start, va_end, and va_copy are not nothrow. But nothrow was added nearly 2 years ago:

dlang/druntime@d600fa7

@andralex
Copy link
Member

@WalterBright then why does the autotester fail?

@mathias-lang-sociomantic
Copy link
Contributor

Because we're using a DMD which is older than v2.071.0, when the va_* primitives where made nothrow.

@andralex
Copy link
Member

@mathias-lang-sociomantic oh ok, so I guess this will wait for a while?

@braddr
Copy link
Member

braddr commented Dec 11, 2017

Waiting won't do much. The defined bootstrap compiler for DMD is 2.068.2. That's not going to change without discussion and explicit actions. There's repercussions to changing the minimum version that go well beyond the scope of this PR.

@andralex
Copy link
Member

@braddr thanks. Where is the right starting point in moving the version forward?

@wilzbach
Copy link
Contributor

Where is the right starting point in moving the version forward?

AFAICT Walter wants to use -betterC for the backend (#6907), which will require updating all host compilers.

@wilzbach
Copy link
Contributor

Btw what about making these functions templated without args or using static if?

@braddr
Copy link
Member

braddr commented Dec 11, 2017

@andralex a thread (dmd-internal? main d group?) that gains consensus among the relevant players that it's the right thing to do. It's not my call, I don't have much of a stake in it, just pointing out the reality is that 2.068.2 is what has been defined as the long term minimum version that's required to be able to build the code. Changing it isn't the whim of a particular pull but a larger ecosystem issue.

@andralex
Copy link
Member

cc @WalterBright

@WalterBright
Copy link
Member Author

My motivation on making things nothrow in dmd is so that the code can use RAII without penalty. Of course, the 'without penalty' bit also depends on dmd changes I made within the last month or so.

Aside from gdc, ldc, and the autotester, who are the other stakeholders in this?

@jacob-carlborg
Copy link
Contributor

@WalterBright can you add a try-catch around the call to the functions not marked with nothrow?
@WalterBright @andralex we need to decide if we should upgrade the host compilers, there seems to be many different reasons why we want to upgrade.

@wilzbach
Copy link
Contributor

As 2.079.0 is now required to build DMD, this might finally pass on our CIs.
I rebased it and let's hope for the best.

@wilzbach wilzbach closed this Jun 26, 2018
@wilzbach
Copy link
Contributor

Hmm so this looks like it's blocked on GDC (we still use GDC 4.8.5 which is based on 2.068).
If we don't manage to get a newer GDC package in the near future, we could version this PR...

@ibuclaw
Copy link
Member

ibuclaw commented Jun 27, 2018

You're on semaphore now, why not just get gdc-7 from this ppa? https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

@wilzbach wilzbach mentioned this pull request Jul 2, 2018
@wilzbach
Copy link
Contributor

wilzbach commented Jul 2, 2018

You're on semaphore now, why not just get gdc-7 from this ppa?

Because I didn't know about this PPA. Thanks a lot for the hint!
I'm playing around with it in #8431.

@dlang-bot dlang-bot merged commit 1169484 into dlang:master Jul 3, 2018
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.

9 participants