[Top][All Lists]

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

Re: PSPP-BUG: PATCH: numerous warnings from gnulib header files.

From: Paul Eggert
Subject: Re: PSPP-BUG: PATCH: numerous warnings from gnulib header files.
Date: Wed, 06 Feb 2013 22:14:26 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2

In <http://lists.gnu.org/archive/html/bug-gnulib/2013-02/msg00019.html>
on 02/06/2013 12:13 AM, John Darrington wrote:

> ./SOURCE/gl/xalloc.h:176: error: no previous prototype for 'x2nrealloc'

I looked into this, and apparently it's a bug in GCC 4.4.5.
The bug causes GCC to generate a bogus warning if one
compiles with '-Wmissing-prototypes' and if a program
contains an inline function that is not static.

Gnulib's general rule is to cater to GCC non-default compiler warnings
only for the latest stable version of GCC, since older GCCs are
fairly buggy in this area, and it's too much hassle to try
to pacify them all.

PSPP's Makefile.am enables -Wmissing-prototypes whenever
it's compiling with GCC, so one way to fix the problem would
be to patch PSPP's Makefile.am as follows.  Another possibility would be
to patch Makefile.am so that it enables -Wmissing-prototypes
only for (say) GCC 4.7.2 or later, since we know 4.7.2 doesn't
have the bug.

diff --git a/Makefile.am b/Makefile.am
index 48ec507..def9a56 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ AM_CFLAGS=
 if cc_is_gcc
 AM_CFLAGS+=-Wall -W -Wwrite-strings -Wstrict-prototypes \
--Wpointer-arith -Wno-sign-compare -Wmissing-prototypes
+-Wpointer-arith -Wno-sign-compare

By the way, on Fedora 17 I couldn't follow PSPP's README.Git
instructions without using the following additional patch;
otherwise the pkg-config macros didn't work.  I'll CC: this
email to bug-gnu-pspp to give them a heads-up about both

diff --git a/Smake b/Smake
index a404de4..38547a2 100644
--- a/Smake
+++ b/Smake
@@ -130,7 +130,7 @@ prep_ph:
        libtoolize --force --automake
-       aclocal -I m4 -I gl/m4
+       aclocal -I m4 -I gl/m4 -I /usr/share/aclocal
 configure: configure.ac aclocal.m4

reply via email to

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