unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* RE: guile 1.8.7 static const char foo[] is incomplete type, rejected by some compilers
@ 2010-06-09 19:13 Jay K
  2010-06-09 21:29 ` Andy Wingo
  0 siblings, 1 reply; 5+ messages in thread
From: Jay K @ 2010-06-09 19:13 UTC (permalink / raw)
  To: bug-guile


> 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: jay.krell@cornell.edu
> To: bug-guile@gnu.org
> 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
>
 		 	   		  


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-10 18:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-09 19:13 guile 1.8.7 static const char foo[] is incomplete type, rejected by some compilers Jay K
2010-06-09 21:29 ` Andy Wingo
2010-06-09 21:32   ` Jay K
2010-06-09 22:49     ` Andy Wingo
2010-06-10 18:09       ` Jay K

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).