[Ecls-list] How to wrap and return constant pointers with c-inline?

Matthew Mondor mm_lists at pulsar-zone.net
Sun Jul 7 19:57:01 UTC 2013


On Sun, 7 Jul 2013 18:17:28 +0200
Peter Enerccio <enerccio at gmail.com> wrote:

> Sure. memory can be read only, but that has more to do with OS, CPU
> registers and segmentation, really. And it only applies to cstrings and
> constant numbers, really. You cant mark class/struct in ro memory, because
> even though class/struct is read only, fields will not be. And especially
> in c++ you cant because you will need to write the class in at
> initialization anyways. Ultimately though, pointers are just numbers, so
> casts work precisely.

Having read-only data is one of the possible implications, not the only
one; for instance a compiler might not need to be a full-program
optimizer to infer the absence of some side effects in some
circumstances...  But I admit again that in general it's still more
useful for humans.
-- 
Matt




More information about the ecl-devel mailing list