[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compilation failure with gperf-3.0.1 and gcc-4.0.1
From: |
Niels Möller |
Subject: |
Compilation failure with gperf-3.0.1 and gcc-4.0.1 |
Date: |
26 Nov 2005 22:56:57 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Probably a known problem, but anyway: When compiling gperf-3.0.1 with
gcc-4.0.1, I get error messages on src/positions.h,
g++ -O2 -mcpu=v9 -I. -I../../src/../lib -c ../../src/positions.cc
../../src/positions.h:74: error: 'PositionIterator' does not name a type
../../src/positions.h:77: error: 'PositionIterator' does not name a type
../../src/positions.h:79: error: 'PositionReverseIterator' does not name a
type
../../src/positions.h:82: error: 'PositionReverseIterator' does not name a
type
../../src/positions.icc:154: error: no 'PositionIterator
Positions::iterator() const' member function declared in class 'Positions'
Adding forward declarations (trivial patch below) solves the problem.
In case it matters, this happened on SunOS 5.10.
Best regards,
/Niels
--- positions.h~ 2003-04-07 11:48:19.000000000 +0200
+++ positions.h 2005-11-26 22:26:30.780114000 +0100
@@ -26,6 +26,10 @@
#ifndef positions_h
#define positions_h 1
+/* Forward declarations */
+class PositionIterator;
+class PositionReverseIterator;
+
/* This class denotes a set of byte positions, used to access a
keyword. */
class Positions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Compilation failure with gperf-3.0.1 and gcc-4.0.1,
Niels Möller <=