Karim Belabas on Thu, 06 Oct 2016 10:46:57 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: is_universal_constant() assumes that gen_0 <= ghalf


* Jeroen Demeyer [2016-10-06 07:56]:
> On 2016-10-04 17:48, Karim Belabas wrote:
> >2) I don't think that we can rely on the address of 'readonly_constants'
> >to be already fixed within its initializer (even though it works in
> >practice with the compilers I tried); this is bad.
> 
> There is some discussion about this at http://stackoverflow.com/questions/25683034/defining-a-pointer-to-refere-to-same-variable-names-reference
> 
> The answer is that it's perfectly fine to do what I did.

Indeed. I double checked old standards in the meantime, e.g.

  http://port70.net/~nsz/c/c89/c89-draft.html#3.1.2.1

and I do agree now. Let's revert that part to your original patch and
see if some (non-conforming) compiler breaks on this.

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`