Branch: Tag:

2006-09-17

2006-09-17 14:57:00 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved diagnostics.

Rev: src/post_modules/GL/gen.pike:1.24

489:    prot[f]+")\", OPT_SIDE_EFFECT);\n";    foreach(sort(indices(constants)), string co) {    int val = constants[co]; -  if (val >= 1 << 31 || val < -(1 << 31)) -  error("Constant %s = %O out of range 32 bit.", co, val); +  if ((val & ~0x7fffffff) && ((val & ~0x7fffffff) != ~0x7fffffff)) +  error("Constant %s = %O out of range 32 bit (masked: %O).", +  co, val, val & ~0x7fffffff);    else    res += " add_integer_constant(\""+co+"\", "+    (string)val+", 0);\n";