Skip to content

Issue 13485 - FP wrong-code with -O#4394

Merged
WalterBright merged 1 commit intodlang:masterfrom
yebblies:issue13485
Feb 14, 2015
Merged

Issue 13485 - FP wrong-code with -O#4394
WalterBright merged 1 commit intodlang:masterfrom
yebblies:issue13485

Conversation

@yebblies
Copy link
Contributor

@yebblies yebblies commented Feb 8, 2015

Converting x += a; x += b to x += a + b; is not valid with floating point types in D.

I'm assuming it is valid with fastfloat enabled, @WalterBright ?

https://issues.dlang.org/show_bug.cgi?id=13485

@9il
Copy link
Member

9il commented Feb 8, 2015

Thanks! I hope this PR unblock dlang/phobos#2513.

Copy link
Member

Choose a reason for hiding this comment

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

extra parens for clarity?

((config.flags4 & CFG4fastfloat) || !tyfloating(em->Ety)) &&

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The backend's style is no parens.

@WalterBright
Copy link
Member

Documentation on fastfloat: http://www.digitalmars.com/ctg/sc.html#dashff

No, I don't think it applies. I'd just remove the check for it from the patch.

@yebblies
Copy link
Contributor Author

Updated.

WalterBright added a commit that referenced this pull request Feb 14, 2015
Issue 13485 - FP wrong-code with -O
@WalterBright WalterBright merged commit 527b3cf into dlang:master Feb 14, 2015
@yebblies yebblies deleted the issue13485 branch February 14, 2015 04:29
@yebblies
Copy link
Contributor Author

Thanks!

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