[Issue 11268] [REG 2.064beta] cannot use non-constant CTFE pointer in an initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Oct 16 18:46:19 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=11268
--- Comment #3 from Don <clugdbug at yahoo.com.au> 2013-10-16 18:46:18 PDT ---
This isn't a regression. It used to compile, but it generated wrong code.
Here's a reduced case:
---
static const char [] x = "abc";
static const char *p = x.ptr;
void main()
{
assert(p == x.ptr);
}
---
2.063: compiles, but assert fails
2.064: does not compile.
That's an improvement.
With the way the glue layer works at the moment, I don't think this can be made
to work right now. The glue layer only allows you to have a pointer to a
symbol, but this is a pointer to a nameless string literal. It could never have
generated correct code.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list