Re: HP-UX 11i compile failures



On Wed, Oct 16, 2002 at 03:03:42PM -0500, Albert Chin wrote:
> Attempting to build 2.0.7 with the HP C compiler on 11i:
> cc: "nautilus-directory-async.c", line 1232: error 1721: Operands for
> < must be of arithmetic type or pointers to compatible types.
> cc: "nautilus-directory-async.c", line 1232: error 1563: Expression in
> if must be scalar.
> cc: "nautilus-directory-async.c", line 1235: error 1721: Operands for
> > must be of arithmetic type or pointers to compatible types.
> cc: "nautilus-directory-async.c", line 1235: error 1563: Expression
> > in if must be scalar.
> cc: "nautilus-directory-async.c", line 1239: error 1721: Operands
> > for < must be of arithmetic type or pointers to compatible types.
> cc: "nautilus-directory-async.c", line 1239: error 1563: Expression
> > in if must be scalar.
> cc: "nautilus-directory-async.c", line 1242: error 1721: Operands
> > for > must be of arithmetic type or pointers to compatible types.
> cc: "nautilus-directory-async.c", line 1242: error 1563: Expression
> > in if must be scalar.
> gmake[2]: *** [nautilus-directory-async.lo] Error 1
> gmake[2]: Leaving directory
> `/opt/build/nautilus-2.0.7/libnautilus-private'
> 
> Problematic code:
>                 if (callback_a->callback.directory < callback_b->callback.directory) {
>                         return -1;
>                 }
>                 if (callback_a->callback.directory > callback_b->callback.directory) { 
>                         return 1;
>                 }
> 
> Should I cast to fix?

BTW, gcc -ansi -pedantic returns:
  warning: ANSI C forbids ordered comparisons of pointers to functions

-- 
albert chin (china thewrittenword com)



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