bug-guile
[Top][All Lists]
Advanced

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

RE: guile 1.8.7 static const char foo[] is incomplete type, rejected by


From: Jay K
Subject: RE: guile 1.8.7 static const char foo[] is incomplete type, rejected by some compilers
Date: Wed, 9 Jun 2010 19:13:01 +0000

> I will try ftp://alpha.gnu.org/gnu/guile/guile-1.9.11.tar.gz.
Haven't managed to get it to find bdw-gc, despite building and installing it..


Due this is other difficulties, I tried building guile 1.8.7 with native cc:


libtool: compile:  cc -DHAVE_CONFIG_H -I.. -I/home/jayk/src/guile-1.8.7 -I.. 
-ieee -ieee -D_REENTRANT -pthread -I/home/jayk/include -L/home/jayk/lib -c -MD 
/home/jayk/src/guile-1.8.7/libguile/hashtab.c  -DPIC -o 
.libs/libguile_la-hashtab.o
cc: Error: /home/jayk/src/guile-1.8.7/libguile/hashtab.c, line 914: The static 
declaration of "s_scm_hash_fold" is a tentative definition and specifies an 
incomplete type. (incompstat)
static const char s_scm_hash_fold[];
------------------^
cc: Error: /home/jayk/src/guile-1.8.7/libguile/hashtab.c, line 952: The static 
declaration of "s_scm_hash_for_each" is a tentative definition and specifies an 
incomplete type. (incompstat)
static const char s_scm_hash_for_each[];

bash-4.1$ diff  orig/guile-1.8.7/libguile/hashtab.c 
guile-1.8.7/libguile/hashtab.c
914c914
< static const char s_scm_hash_fold[];
---
> static const char s_scm_hash_fold[sizeof("hash-fold")];
952c952
< static const char s_scm_hash_for_each[];
---
> static const char s_scm_hash_for_each[sizeof("hash-for-each")];


bash-4.1$ cc -V
Compaq C V6.3-025 on Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-026 (sys) cc Driver


It the compiles ok. I don't hit the isinf error, not surprising, since there's 
then no -Wmissing-prototypes.


 - Jay


----------------------------------------
> From: address@hidden
> To: address@hidden
> Subject: isinf and type-pun warning/error on OSF guile 1.8.7
> Date: Wed, 9 Jun 2010 15:43:49 +0000
>
>
> libtool: compile:  gcc -DHAVE_CONFIG_H -I.. -I/home/jayk/src/guile-1.8.7 -I.. 
> -mieee -mieee -D_REENTRANT -pthread -g -O2 -Wall -Wmissing-prototypes -Werror 
> -MT libguile_la-numbers.lo -MD -MP -MF .deps/libguile_la-numbers.Tpo -c 
> /home/jayk/src/guile-1.8.7/libguile/numbers.c  -DPIC -o 
> .libs/libguile_la-numbers.o
> cc1: warnings being treated as errors
> /home/jayk/src/guile-1.8.7/libguile/numbers.c: In function 'xisinf':
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:144: error: implicit 
> declaration of function 'isinf'
> /home/jayk/src/guile-1.8.7/libguile/numbers.c: In function 'guile_ieee_init':
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:623: error: dereferencing 
> type-punned pointer will break strict-aliasing rules
> /home/jayk/src/guile-1.8.7/libguile/numbers.c:654: error: dereferencing 
> type-punned pointer will break strict-aliasing rules
> make[3]: *** [libguile_la-numbers.lo] Error 1
> make[3]: Leaving directory `/home/jayk/obj/guile/libguile'
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/jayk/obj/guile/libguile'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/jayk/obj/guile'
> make: *** [all] Error 2
> bash-4.1$
>
>
> I hacked these bogusly to fix.
> Put "0 &&" on the first #if and removed -Werror from libguile/Makefile for 
> the second.
> I couldn't find isinf in any header.
>   Oops, I guess I should have just removed -Wmissing-prototypes. I'll try 
> that.
>
>
> I recall seeing the same problem on Irix, where autoconf does a link check
> and compiles without -Wmissing-prototype so it passes, because the function
> does exist somewhere. Autoconf checks need to more closely resemble
> how later compilation will occur.
>
>
> It is *possible* I changed gcc from 4.5.0 to 4.3.5 while this was compiling, 
> but I don't think so.
>
>
> Same thing in make check:
>
>
> /home/jayk/src/guile-1.8.7/test-suite/standalone/test-conversion.c:859: 
> error: dereferencing type-punned pointer will break strict-aliasing rules
> make[4]: *** [test_conversion-test-conversion.o] Error 1
>
>
> I will try ftp://alpha.gnu.org/gnu/guile/guile-1.9.11.tar.gz.
>
>
>  - Jay
>
                                          


reply via email to

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