[gnu.g++] Mysterious compiler error

elf@gilan.Berkeley.EDU (Marc Singer) (06/07/89)

Before the error, let me post a request.  I checked in to this
news source about a week ago to find that there are some
updates for the G++ 1.35.0 compiler.  None of my normal sources
for sources has any diffs for 1.35.1 or above.  Where can I find them?
I would be happy to receive them via ftp or by direct e-mail.

Now then. (Sounds better that it reads.)

Granted that this is probably only mysterious to me, I would like
some help deciphering a G++ error message.


class DnaPool : public StringGenericSplayMap {};
//...//
class Dna {
protected:
  static DnaPool dnaPool(0);
//...//
};

The StringGenericSplayMap has been tested previously when defined using
constructors.  It was created from libg++'s prototype class SplayMap.

The compiler reports:
  storage class specified for typename
on the static ... line.  It is not the case of the symbols because
I checked that.  What could it be complaining about?


  


Marc Singer
        "When fullness is taken from fullness,
         fullness still remains."
                        Invocation of the Isha Upanishad

schmidt@ics.uci.edu (Doug Schmidt) (06/07/89)

In article <29500@ucbvax.BERKELEY.EDU> elf@gilan.Berkeley.EDU (Marc Singer) writes:
++ Before the error, let me post a request.  I checked in to this
++ news source about a week ago to find that there are some
++ updates for the G++ 1.35.0 compiler.  None of my normal sources
++ for sources has any diffs for 1.35.1 or above.  Where can I find them?
++ I would be happy to receive them via ftp or by direct e-mail.

Check out yahi.stanford.edu 36.83.0.92

++ class DnaPool : public StringGenericSplayMap {};
++ //...//
++ class Dna {
++ protected:
++   static DnaPool dnaPool(0);
++ //...//
++ };
++ 
++ The StringGenericSplayMap has been tested previously when defined using
++ constructors.  It was created from libg++'s prototype class SplayMap.
++ 
++ The compiler reports:
++   storage class specified for typename
++ on the static ... line.  It is not the case of the symbols because
++ I checked that.  What could it be complaining about?

Your problem is that you are trying to declare a *static* class
variable dnaPool (0) that takes a constructor.  This is currently
illegal in cfront 1.2 (and in some versions of G++).  cfront 2.0 lifts
this restriction somewhat and I assume G++ will also handle this
properly in subsequent releases (in fact, it may already handle it
correctly).

        Doug
--
Any man's death diminishes me,              | schmidt@ics.uci.edu (ARPA)
Because I am involved in Mankind;           | office: (714) 856-4043
And therefore never send to know for whom the bell tolls;
It tolls for thee        -- John Donne