Re: GCC 4.3 C++ question

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

 



Tim Niemueller wrote:
Hi all.

I'm currently investigating for our codebase how smooth the transition
can be to GCC 4.3. There I'm running into the following problem on F9Alpha:

I have a class which has a "sub-typedef" for an internal list, something
like:

class SomeClass
{
 public:
   SomeClass();
   // more stuff...
 protected:
   typedef struct _mylist mylist_t;
   struct _mylist {
     mylist_t *next;
     void *dataM
   };
};

Now, this gives me compiler errors about "invalid use of incomplete type
»struct _mylist«" for the accompanying .cpp file. If I move the typedef
and struct out of the class this works (put it before "class SomeClass").

Have I been using something that was not supposed to be done before or
is that a bug in the current pre-release? I'm quite used to be able to
have something like SomeClass::mylist_t as types so I'd expect the latter.


Maybe (just guessing here) the typedef should be:
typedef struct SomeClass::_mylist mylist_t;

?

Regards,

Hans

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux