Skip to content

Solaris: fix assert for betterC build.#2566

Merged
dnadlinger merged 2 commits intoldc-developers:masterfrom
tethyslab:illumos-betterc-assert
Feb 9, 2018
Merged

Solaris: fix assert for betterC build.#2566
dnadlinger merged 2 commits intoldc-developers:masterfrom
tethyslab:illumos-betterc-assert

Conversation

@nykytenko
Copy link
Contributor

No description provided.

} else if (global.params.targetTriple->isOSSolaris()) {
const auto irFunc = gIR->func();
const auto funcName =
irFunc && irFunc->decl ? irFunc->decl->toPrettyChars() : "";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add parens here, to avoid relying on operator precedence rules. (i know it is a copy from a few lines above)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@JohanEngelen
Copy link
Member

LGTM (with the nit). A lit test would be nice for betterC assert function name (do we have one already?).

@kinke
Copy link
Member

kinke commented Feb 8, 2018

A DMD test makes sure a betterC program with assertions can be linked.

@nykytenko nykytenko force-pushed the illumos-betterc-assert branch from b8c6212 to a8cf534 Compare February 9, 2018 08:13
@dnadlinger dnadlinger merged commit 907dae1 into ldc-developers:master Feb 9, 2018
joakim-noah pushed a commit that referenced this pull request Jun 11, 2018
* Solaris: fix assert for betterC build.

* Added parens to avoid relying on operator precedence rules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants