help-octave
[Top][All Lists]
Advanced

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

g++-4 vs. gperf (was: FYI: compiling octave with gcc4 (no go))


From: John W. Eaton
Subject: g++-4 vs. gperf (was: FYI: compiling octave with gcc4 (no go))
Date: Fri, 18 Feb 2005 17:30:15 -0500

On 18-Feb-2005, Dmitri A. Sergatskov <address@hidden> wrote:

| I also got the following problem which I cannot solve:
| 
| g++4 -c  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -I../glob 
-I ../glob -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -O2 -mcpu=athlon-mp 
-mtune=a thlon-mp 
| -pipe lex.cc -o pic/lex.o
| octave.gperf: In function ?const octave_kw* octave_kw_lookup(const char*, 
unsign ed int)?:
| octave.gperf:99: error: ?<anonymous enum>? is/uses anonymous type
| octave.gperf:99: error:   trying to instantiate ?template<class T> 
template<clas s U> octave_int::octave_int(U)?
| ...
|       and later on
| octave.gperf:103: error: ?<anonymous enum>? is/uses anonymous type
| octave.gperf:103: error:   trying to instantiate ?template<class T> 
template<cla ss U> octave_int::octave_int(U)?
| lex.l: In member function ?bool 
bracket_brace_paren_nesting_level::is_bracket()? :
| lex.l:196: error: ?bracket_brace_paren_nesting_level::<anonymous enum>? 
is/uses anonymous type
| lex.l:196: error:   trying to instantiate ?template<class T> template<class 
U> o ctave_int::octave_int(U)?
| lex.l:196: error: ?bracket_brace_paren_nesting_level::<anonymous enum>? 
is/uses anonymous type
| 
| ...
| 
| This is not a crucial problem for me (I have a working octave, compiled with 
gcc3.4.3),
| but perhaps of some interest to others...

This code is generated by gperf.  I think you can avoid the problem
with the following patch.  I see no reason to prefer enum values over
defined constants here, so we might as well use this set of options
for gperf.

Thanks,

jwe


src/ChangeLog:

2005-02-18  John W. Eaton  <address@hidden>

        * Makefile.in (oct-gperf.h): Remove -E from list of gperf options.


Index: src/Makefile.in
===================================================================
RCS file: /usr/local/cvsroot/octave/src/Makefile.in,v
retrieving revision 1.358
diff -u -r1.358 Makefile.in
--- src/Makefile.in     12 Feb 2005 02:29:34 -0000      1.358
+++ src/Makefile.in     18 Feb 2005 22:21:55 -0000
@@ -531,7 +531,7 @@
 
 oct-gperf.h: octave.gperf
        @echo "making $@ from $<"
-       @$(GPERF) -t -C -D -E -G -L C++ -Z octave_kw_hash \
+       @$(GPERF) -t -C -D -G -L C++ -Z octave_kw_hash \
          $< | $(SED) 's,lookup\[,gperf_lookup[,' > address@hidden
        @$(top_srcdir)/move-if-change address@hidden $@
 





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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