octave-maintainers
[Top][All Lists]
Advanced

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

src/oct-gperf.h enum values - with error messages


From: Clinton Chee
Subject: src/oct-gperf.h enum values - with error messages
Date: Tue, 30 Nov 2004 14:38:10 +1100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

Sorry, forgot to include error messages.
The messages are typically:


 cc-1491 CC: ERROR File = octave.gperf, Line = 96
  A template argument cannot reference an unnamed type.

                ^

      if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
MDiagArray2<Complex> &)" &operator+=(MArray<double> &, const MArray<double> &)" ^


cc-1491 CC: ERROR File = octave.gperf, Line = 96
  A template argument cannot reference an unnamed type.


 "MDiagArray2<Complex>         ^


    if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)




 CC: ERROR File = octave.gperf, Line = 96
  A template argument cannot reference an unnamed type.


     ^
              ^


    if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)




               ^
&operator-=(MArray<Complex> &, const MArray<Complex> &)"

  detected during instantiation ofdetected during instantiation ofcc-1468




-------- Original Message --------
Subject: src/oct-gperf.h enum values
Resent-Date: Mon, 29 Nov 2004 21:15:23 -0600
Resent-From: address@hidden
Date: Tue, 30 Nov 2004 14:09:06 +1100
From: Clinton Chee <address@hidden>
To: address@hidden

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
----------------------------------------------------------------------------


--


----------------------------------------------------------------------------
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 via email to

[Prev in Thread] Current Thread [Next in Thread]