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

Turly O'Connor turly@apple.com
Sat May 27 21:58:00 GMT 2000

> 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!


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

More information about the Gcc-bugs mailing list