Skip to content
This repository has been archived by the owner on Jun 20, 2019. It is now read-only.

Commit

Permalink
Bug 141 - Signed integer overflow handled incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuclaw committed Jul 17, 2014
1 parent 9e09583 commit 2b3286e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gcc/d/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2014-07-17 Iain Buclaw <ibuclaw@gdcproject.org>

* d-lang.cc(d_init_options_struct): Set flag_wrapv as on by default.

2014-07-14 Iain Buclaw <ibuclaw@gdcproject.org>

* d-elem.cc(NewExp::toElem): Don't initialise a new'd struct at the
Expand Down
3 changes: 3 additions & 0 deletions gcc/d/d-lang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ d_init_options_struct (gcc_options *opts)

// Honour left to right code evaluation.
opts->x_flag_evaluation_order = 1;

// D says that signed overflow is precisely defined.
opts->x_flag_wrapv = 1;
}

static void
Expand Down

0 comments on commit 2b3286e

Please sign in to comment.