[dmd-internals] [D-Programming-Language/dmd] 021097: Improve const-folding error msg for static variabl...
GitHub
noreply at github.com
Tue Jun 4 18:07:37 PDT 2013
Branch: refs/heads/master
Home: https://github.com/D-Programming-Language/dmd
Commit: 021097056744c23231427b71e65bd04abc72d3e3
https://github.com/D-Programming-Language/dmd/commit/021097056744c23231427b71e65bd04abc72d3e3
Author: Don Clugston <emailsdontbelong at inarepository.com>
Date: 2013-06-02 (Sun, 02 Jun 2013)
Changed paths:
M src/optimize.c
M test/fail_compilation/diag7420.d
Log Message:
-----------
Improve const-folding error msg for static variables
The error message for an attempt to read a runtime variable
from optimize(WANTinterpret) is less informative than the CTFE one.
Improve the optimize() version, so that the test suite is ready for
the change to using CTFE throughout.
Commit: 993d19837b90b014fb98e46515453797fe19a162
https://github.com/D-Programming-Language/dmd/commit/993d19837b90b014fb98e46515453797fe19a162
Author: Don Clugston <emailsdontbelong at inarepository.com>
Date: 2013-06-02 (Sun, 02 Jun 2013)
Changed paths:
M src/staticassert.c
Log Message:
-----------
CTFE: Improve error message for static assert
by running optimize(0) first.
Currently static assert uses optimize(WANTinterpret) for const folding. This has
the side-effect of simplifying the expression before evaluating it, which makes
error messages nicer. If we simply change to using CTFE instead, the error
messages won't get simplified. So insert a call to optimize(0) before running CTFE.
Commit: 0ec66ad7bca4c6f87ddb3868b5327baac9b435bb
https://github.com/D-Programming-Language/dmd/commit/0ec66ad7bca4c6f87ddb3868b5327baac9b435bb
Author: Walter Bright <walter at walterbright.com>
Date: 2013-06-04 (Tue, 04 Jun 2013)
Changed paths:
M src/optimize.c
M src/staticassert.c
M test/fail_compilation/diag7420.d
Log Message:
-----------
Merge pull request #2117 from donc/ctfe_harmonize_errormsg
Make CTFE error messages same as for const-folding
Compare: https://github.com/D-Programming-Language/dmd/compare/bc8d78e3f94a...0ec66ad7bca4
More information about the dmd-internals
mailing list