gtk-peer compile fixes for gcc-2.95

Mark Wielaard mark@klomp.org
Sun Apr 4 22:49:00 GMT 2004


Hi,

On Thu, 2004-04-01 at 01:36, Tom Tromey wrote:
> It is better to set AM_CFLAGS instead.  You can set this
> in configure.ac just fine.  There's also a standard trick for
> handling gcc-specific options:
> 
>     AM_CFLAGS=
>     if test "$GCC" = yes; then
>       AM_CFLAGS='-std=c89 -Wfoo -Wbar'
>     fi
>     AC_SUBST(AM_CFLAGS)

Thanks for that tip.
The attached patch does that and enables -Wall for GNU Classpath.
There are some interesting warnings in the code and I think I already
found one issue with TARGET_NATIVE_FILE_FILEPERMISSION_READONLY that
could prevent proper compilation/execution on certain platforms.

> We set CFLAGS to -g in a specific case, that is sort of different
> since it claims to work around bugs in the infamous gcc "2.96".  I'd
> prefer we avoid this in general.

I have just removed this for now.
Will test on a system with 2.96 when I can.

The patch also removes some of the special JAPHAR and KAFFE support that
hasn't worked for years anyway. (Since as Tom pointed out, we should
remove code that isn't supported anymore anyway.

It fixes all issues found when compiling with -std=c89. Lots in the gtk
peers I am afraid. So please yell and scream if this is to intrusive. It
would be good if the gtk-peer stuff in libgcj was also compiled with
this flag.

No ChangeLog entry for now and not tested much yet (it doesn't seem to
break things spectacularly so I think this is generally OK). Will finish
this later this week. But please let me know if the general idea of the
patch is objectionable.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stdc98.diff
Type: text/x-patch
Size: 31681 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040404/9f95e2ee/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040404/9f95e2ee/attachment.sig>


More information about the Java-patches mailing list