This is the mail archive of the gcc@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]

gcc/f/malloc.h and HP-UX 10.20


Does K&R allow forward declarations (from gcc/f/malloc.h):

/* Typedefs. */

typedef struct _malloc_area_ *mallocArea_;
typedef struct _malloc_pool_ *mallocPool;

...

/* Structure definitions. */

struct _malloc_area_
  {
    mallocArea_ next;
    mallocArea_ previous;
    void *where;
    ...

Compiling with HP-UX 10.20 commercial C compiler:
# cc  -DIN_GCC    -g   -DHAVE_CONFIG_H -DGENERATOR_FILE  -I. -If
-I../../gcc -I../../gcc/f -I../../gcc/config -I../../gcc/../include
../../gcc/f/ansify.c -o f/ansify
cc: "../../gcc/f/malloc.h", line 106: error 1000: Unexpected symbol: "a".
cc: "../../gcc/f/malloc.h", line 107: error 1000: Unexpected symbol: "malloc_find_inpool_".
cc: "../../gcc/f/malloc.h", line 107: error 1000: Unexpected symbol: "pool".
cc: "../../gcc/f/malloc.h", line 109: error 1000: Unexpected symbol: "pool".
cc: "../../gcc/f/malloc.h", line 110: error 1000: Unexpected symbol: "mallocSize".
cc: "../../gcc/f/malloc.h", line 111: error 1000: Unexpected symbol: "size".
cc: "../../gcc/f/malloc.h", line 112: error 1000: Unexpected symbol: "pool".
cc: "../../gcc/f/malloc.h", line 113: error 1000: Unexpected symbol: "mallocSize

Turning on ANSI mode works.

-- 
albert chin (china@thewrittenword.com)


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