src/oct-gperf.h enum values

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

src/oct-gperf.h enum values

Clinton Chee-2
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
----------------------------------------------------------------------------


Reply | Threaded
Open this post in threaded view
|

src/oct-gperf.h enum values

John W. Eaton-6
On 30-Nov-2004, Clinton Chee <[hidden email]> wrote:

| Why is there comilation problem for v 63 but not v 57 of Octave relating
| to the file oct-gperf.h.

I don't see a problem here with the tools I'm using, and you mentioned
earlier that you are using the SGI compilers, which I don't have, so I
think you will need to provide some additional information.  What is
the compilation problem?  Precisely what error message do you see?

jwe