Thread: bogus unixware compiler warnings

bogus unixware compiler warnings

From
Stefan Kaltenbrunner
Date:
I'm slowly working on submitting patches to reduce the amount of (bogus)
compiler warnings generated by various buildfarm members.

Warthog(the unixware box) generates some 1140 lines of:

UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled
UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled

which seems to be a result of having both -g and -O in CFLAGS - Olivier
was so kind to test the attached patch which get's rid of all those
bogus warnings (and seems to be in line with what we are doing on other
platforms like solaris).


Stefan
Index: src/template/unixware
===================================================================
RCS file: /projects/cvsroot/pgsql/src/template/unixware,v
retrieving revision 1.41
diff -c -r1.41 unixware
*** src/template/unixware    14 Dec 2006 21:49:54 -0000    1.41
--- src/template/unixware    15 Jul 2007 16:54:43 -0000
***************
*** 11,21 ****
          f(0, 0);
  }
  __EOF__
!
    if $CC -c -O -Kinline conftest.c >conftest.err 2>&1; then
!     CFLAGS="-O -Kinline"
    else
!     CFLAGS="-O -Kinline,no_host"
    fi
    rm -f conftest.*

--- 11,23 ----
          f(0, 0);
  }
  __EOF__
!   if test "$enable_debug" != yes; then
!     CFLAGS="-O"
!   fi
    if $CC -c -O -Kinline conftest.c >conftest.err 2>&1; then
!     CFLAGS="$CFLAGS -Kinline"
    else
!     CFLAGS="$CFLAGS -Kinline,no_host"
    fi
    rm -f conftest.*


Re: bogus unixware compiler warnings

From
Neil Conway
Date:
On Mon, 2007-07-16 at 13:11 +0200, Stefan Kaltenbrunner wrote:
> I'm slowly working on submitting patches to reduce the amount of (bogus)
> compiler warnings generated by various buildfarm members.
>
> Warthog(the unixware box) generates some 1140 lines of:
>
> UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled
> UX:cc: WARNING: debugging and optimization mutually exclusive; -O disabled

Applied, thanks for the patch.

-Neil