Re: FVWM: configure broken with 2.5.5

From: Dan Espen <dane_at_mk.telcordia.com>
Date: Sat, 22 Feb 2003 17:00:17 -0500

Ben Winslow <rain_at_bluecherry.net> writes:
> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
> --------------enigD8DAD9F42323ACF870F5E6DA
> Content-Type: text/plain; charset=us-ascii; format=flowed
> Content-Transfer-Encoding: 7bit
>
> Dan Espen wrote:
> > fork> gcc x.c
> > x.c: In function `warn':
> > x.c:13: warning: assignment makes pointer from integer without a cast
> > x.c:13: warning: assignment makes integer from pointer without a cast
> > x.c:14: warning: assignment makes integer from pointer without a cast
> > x.c:14: warning: assignment from incompatible pointer type
> >
> > Maybe someone else on the list can clarify.
> >
>
> After a little experimentation and research, it seems that nested
> functions are forbidden by ISO C but allowed by ANSI (resulting in
> functions with limited scope.) gcc will generate a warning about the
> nested function if you compile with -pedantic; Forte is notorious for
> being pedantic all the time ;)
>
> Anyway, the actual test is defined in configure.in:
>
> dnl catch -Werror and similar options when running configure
> AC_TRY_COMPILE([#include <stdio.h>],
> [int warn(void) {
> int i; static j; int *p; char *c;
> switch (*p = p = *c) { case 0: printf("%Q", c, p); }
> *c = &i; c = p;
> while (1 || (unsigned int)3 >= 0 || ((int)-1) == ((unsigned int)1));
> return; }], , AC_MSG_ERROR("
> configure is not able to compile programs with warnings. Please
> remove all offending options like -Werror from the CFLAGS and
> CPPFLAGS variables and run configure again."))
>
> According to the autoconf manual, only the function body is supposed to
> be passed as the second argument--the function declaration itself ('int
> warn(void) {') should be dropped, and that will hopefully fix the
> problem. I don't have a Solaris box to test that on, though.

Thanks Ben.

Guess I've been fooled by configure again.

-- 
Dan Espen                           E-mail: dane_at_mk.telcordia.com
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Feb 22 2003 - 16:02:28 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST