D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 18496 - Complement expressions now actually int promote
Summary: Complement expressions now actually int promote
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL: http://https://dlang.org/spec/express...
Keywords: pull, spec
Depends on:
Blocks:
 
Reported: 2018-02-22 15:45 UTC by Steven Schveighoffer
Modified: 2022-08-21 22:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Steven Schveighoffer 2018-02-22 15:45:32 UTC
The spec for integer promotions currently says: "Note: the usual integral promotions are not performed prior to the complement operation."

However, while this is currently true, it's a deprecation, and is NOT true with the -transition=intpromote flag. This should be reflected in the spec.

Also, there are no notes for any of the other affected unary expressions about integer promotion. Those should be added.
Comment 1 Dlang Bot 2022-08-21 16:19:08 UTC
@ntrel created dlang/dlang.org pull request #3385 "Fix Issue 18496 - Complement expressions now actually int promote" fixing this issue:

- Fix Issue 18496 - Complement expressions now actually int promote
  
  Also document promotion before unary `-` and `+`.

https://github.com/dlang/dlang.org/pull/3385
Comment 2 Dlang Bot 2022-08-21 22:42:24 UTC
dlang/dlang.org pull request #3385 "Fix Issue 18496 - Complement expressions now actually int promote" was merged into master:

- fa0a3c69b44829454f927d651c13a34795d7bac0 by Nick Treleaven:
  Fix Issue 18496 - Complement expressions now actually int promote
  
  Also document promotion before unary `-` and `+`.

https://github.com/dlang/dlang.org/pull/3385