Bug 16649 – Header gen skips parens

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-10-29T15:23:22Z
Last change time
2017-12-18T22:56:20Z
Assigned to
No Owner
Creator
Temtaime

Comments

Comment #0 by temtaime — 2016-10-29T15:23:22Z
It makes from sign = data.isZero() ? false : sign ^ (y < 0); a sign = data.isZero() ? false : sign ^ y < 0; which gives Error: y < 0 must be parenthesized when next to operator ^
Comment #1 by andrej.mitrovich — 2017-04-17T14:53:26Z
Header shouldn't contain code, just declarations. Could you show a fuller example?
Comment #2 by temtaime — 2017-04-17T14:59:54Z
If it's a templated function, then with -inline it should contain the code too. Just try to create a header from bigint.d from phobos
Comment #3 by razvan.nitu1305 — 2017-10-31T12:16:23Z
Comment #4 by razvan.nitu1305 — 2017-11-01T09:33:25Z
As the above PR has been merged and the fix is available in HEAD dev branch, I'll close this as resolved. If there is urgent need for this fix, please copy paste the fix from the PR, it's a one liner.
Comment #5 by github-bugzilla — 2017-12-18T22:56:20Z
Commits pushed to stable at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/11c61903ddb4a5fc6c5ef40dbd0334cf8cc29e6e Fix Issue 16649 - Header gen skips parens https://github.com/dlang/dmd/commit/f3446967d9069fa7d7514f73febce017c1311531 Merge pull request #7270 from RazvanN7/Issue_16649 Fix Issue 16649 - Header gen skips parens merged-on-behalf-of: Andrei Alexandrescu <[email protected]>