From maintainers-request at octave dot org Mon Nov 29 21:15:29 2004 Subject: src/oct-gperf.h enum values From: Clinton Chee To: maintainers at octave dot org Date: Tue, 30 Nov 2004 14:09:06 +1100 Dear Octave Maintainers Why is there comilation problem for v 63 but not v 57 of Octave relating to the file oct-gperf.h. Specifically, oct-gperf.h defines a local "enum" structure like this: enum { TOTAL_KEYWORDS = 37, MIN_WORD_LENGTH = 2, MAX_WORD_LENGTH = 22, MIN_HASH_VALUE = 2, MAX_HASH_VALUE = 75 }; Later on in oct-gperf.h it uses the MAX/MIN_WORD_LENGTH like: const struct octave_kw * octave_kw_lookup (register const char *str, register unsigned int len) { if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) { register int key = octave_kw_hash (str, len); This causes problems when compiling but No More Problem if I replace if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) with if (len <= 22 && len >= 2) I am using gperf 3.0.1 for both versions of Octave v57 and v63 but there was no problem in the former. Thanks in advance. Cheers Clinton -- ---------------------------------------------------------------------------- Clinton Chee Computational Scientist High Performance Computing Unit Room 2075, Red Centre University of New South Wales Australia 2035 chee at parallel stop hpc stop unsw stop edu stop au Tel: 61 2 9385 6915 ----------------------------------------------------------------------------