Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: detection of "inline" broken (PR#2104)
Home

[Freeciv-Dev] Re: detection of "inline" broken (PR#2104)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: detection of "inline" broken (PR#2104)
From: Jason Short <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 30 Sep 2002 23:32:51 -0700 (PDT)

Per I. Mathisen wrote:
I have installed gcc-3.2 debian package and replaced the symlinks to gcc
and cpp, but I still get

/* #undef inline */

in config.h, but I do get

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I./../include
-I../../common -I../../intl -I./../agents -I/usr/include/gtk-1.2
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
-I/usr/X11R6/include  -DDEBUG  -g -Wall -Werror -Wpointer-arith
-Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
-Wmissing-declarations -c `test -f chatline.c || echo './'`chatline.c
cc1: warnings being treated as errors
In file included from /usr/include/gtk-1.2/gtk/gtkarg.h:31,
                 from /usr/include/gtk-1.2/gtk/gtkobject.h:31,
                 from /usr/include/gtk-1.2/gtk/gtkaccelgroup.h:35,
                 from /usr/include/gtk-1.2/gtk/gtk.h:32,
                 from gui_main.h:16,
                 from chatline.c:28:
/usr/include/gtk-1.2/gtk/gtktypeutils.h:163: warning: function declaration
isn't a prototype
In file included from /usr/include/gtk-1.2/gtk/gtk.h:80,
                 from gui_main.h:16,
                 from chatline.c:28:
/usr/include/gtk-1.2/gtk/gtkitemfactory.h:48: warning: function
declaration isn't a prototype
make[4]: *** [chatline.o] Error 1

which wasn't there before. If I run "make" without any options it compiles
fine.

I don't get any of those warnings, although my my gcc warning options aren't as strict as yours.

However, the error with inline seems pretty clearly tied in to the extra gcc options. From config.log:

configure:3572: checking for inline
configure:3590: gcc -c -g -Werror -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -O3 -g conftest.c >&5
cc1: warnings being treated as errors
configure:3583: warning: no previous prototype for `foo'
configure:3593: $? = 1
configure: failed program was:
#line 3579 "configure"
#include "confdefs.h"
#ifndef __cplusplus
typedef int foo_t;
static inline foo_t static_foo () {return 0; }
inline foo_t foo () {return 0; }
#endif

followed by other similar messages where "inline" is replaced by "__inline__" and "__inline" in the code.

This test isn't a part of freeciv code, AFAICT. But I wonder how it could be fixed. I also wonder what else gets broken by this - I notice that config.h also thinks I have no working vsnprintf function.

In any case, this does not seem to be a critical bug.

jason




[Prev in Thread] Current Thread [Next in Thread]