[Issue 447] frontend: writeable string constants

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Oct 26 16:24:39 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-10-26:
> http://d.puremagic.com/issues/show_bug.cgi?id=447

> What this would be a move towards is making the DMD source const-correct. Going
> halfway towards it is where the const_cast thing comes in, and that's not any
> better than relying on the literal => char* being allowed. Const correctness
> needs to be done either full bore or not at all. I'm not willing to convert it
> all to be const-correct, because it's ugly, a lot of work, and I'm pretty sure
> would not find a single problem.

Sure, it is a lot of work and the current solution is only a start.
(for the time beeing you could replace "const_cast<char *>" with "mem.strdup")
"Pritty sure" is nice but having as much as possible automatic
detections is more important to me in the long run.

<rant>
Trying to clean up the frontend for 64bit proved surpisingly hard.
64bit builds with gcc and icc show different behaviours.
Seemingly simple test cases like
http://dstress.kuehne.cn/run/l/large_id_01_D.d and
http://dstress.kuehne.cn/compile/template_class_08.d
fail for 64bit but pass for 32bit builds. etc.
</rant>


-----BEGIN PGP SIGNATURE-----

iD8DBQFFQVC5LK5blCcjpWoRAkCgAJ48YFkIuYDNrFNlH0acacLA6HTO6wCeLH5Y
rU0gq/zrcnvzd2lO+FE42eI=
=PQ5G
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list