This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re:gcc2.95 says-"non local function uses anonymous type"


> test.h:5: non local function 'struct {anonymous}  * OpenDatabase(int)
>uses anonymous type

>:4 #include<gdbm.h>
>:5 GDBM_FILE OpenDatabase(int);

We ran into something similar-looking recently: your problem stems
from the fact that there's no structure tag, which gcc needs to do
C++ name mangling.

You presumably have something like:

    typedef struct { ... } * GDBM_FILE;

Change this to:

    typedef struct __GDBM_FILE_RECORD { ... } * GDBM_FILE;

Or whatever, you get my drift.

Of course, I could be completely wrong, but

Have Fun anyway!

--turly

The secret of a happy marriage remains a secret.
                                            -- Henny Youngman



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]