zero-sized constants?
Toon Moene
toon@moene.org
Thu Aug 5 13:18:00 GMT 2010
N.M. Maclaren wrote:
> One common trick is to use separate zero-length constants as indicators
> of different entities, in cases where you aren't really interested in
> the value but only that they are different. If you collected the names
> of such things, it might be possible to make an educated guess as to
> whether that is being done.
>
> That fails horribly when the compiler elides different constants of the
> same value into one, of course :-)
Interesting ... I told Jakub Jelinek some two years ago that for Fortran
it was OK to smash all equal constants into one value (you can't do that
in C because they have to have a different address).
Do you think I made a mistake, standards-wise ?
--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran
More information about the Fortran
mailing list