unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* guile-core does not build with gcc-2.95.4
@ 2003-07-09 20:39 Alex Thiel
  2003-07-09 22:03 ` Kevin Ryde
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Thiel @ 2003-07-09 20:39 UTC (permalink / raw)


Hello, 

trying to compile the latest CVS sources with gcc-2.95.4 I get

gc-malloc.c: In function `scm_gc_realloc':
gc-malloc.c:323: parse error before `void'
gc-malloc.c:330: `ptr' undeclared (first use in this function)

gcc >= 3.0 works fine.

I am new to this list, so I am not aware if gcc versions < 3 are
supported at all, but I thought I let you know anyway.

Cheers,

        Alex



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: guile-core does not build with gcc-2.95.4
  2003-07-09 20:39 guile-core does not build with gcc-2.95.4 Alex Thiel
@ 2003-07-09 22:03 ` Kevin Ryde
  2003-07-13 15:36   ` Andreas Rottmann
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Ryde @ 2003-07-09 22:03 UTC (permalink / raw)
  Cc: guile-devel

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

Alex Thiel <stderr@web.de> writes:
>
> gc-malloc.c: In function `scm_gc_realloc':
> gc-malloc.c:323: parse error before `void'
> gc-malloc.c:330: `ptr' undeclared (first use in this function)

Thanks.  This was a recent change.  I applied a fix.

> gcc >= 3.0 works fine.

Variables defined in the middle of functions, a la C++, is either a
c99-ism or a gcc-ism, not sure which.


[-- Attachment #2: gc-malloc.c.ptr-defn.diff --]
[-- Type: text/plain, Size: 500 bytes --]

--- gc-malloc.c.~1.19.~	2003-07-08 10:28:31.000000000 +1000
+++ gc-malloc.c	2003-07-10 08:00:59.000000000 +1000
@@ -307,6 +307,8 @@
 void *
 scm_gc_realloc (void *mem, size_t old_size, size_t new_size, const char *what)
 {
+  void *ptr;
+
   /* XXX - see scm_gc_malloc. */
 
 
@@ -320,7 +322,7 @@
   decrease_mtrigger (old_size, what);
   increase_mtrigger (new_size, what);
 
-  void *ptr = scm_realloc (mem, new_size);
+  ptr = scm_realloc (mem, new_size);
 
 #ifdef GUILE_DEBUG_MALLOC
   if (mem)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel

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

* Re: guile-core does not build with gcc-2.95.4
  2003-07-09 22:03 ` Kevin Ryde
@ 2003-07-13 15:36   ` Andreas Rottmann
  2003-07-13 22:24     ` Han-Wen Nienhuys
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Rottmann @ 2003-07-13 15:36 UTC (permalink / raw)
  Cc: guile-devel

Kevin Ryde <user42@zip.com.au> writes:

> Alex Thiel <stderr@web.de> writes:
>>
>> gc-malloc.c: In function `scm_gc_realloc':
>> gc-malloc.c:323: parse error before `void'
>> gc-malloc.c:330: `ptr' undeclared (first use in this function)
>
> Thanks.  This was a recent change.  I applied a fix.
>
>> gcc >= 3.0 works fine.
>
> Variables defined in the middle of functions, a la C++, is either a
> c99-ism or a gcc-ism, not sure which.
>
C99, AFAIRC.

Andy
-- 
Andreas Rottmann         | Rotty@ICQ      | 118634484@ICQ | a.rottmann@gmx.at
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Python is executable pseudocode, Perl is executable line-noise.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: guile-core does not build with gcc-2.95.4
  2003-07-13 15:36   ` Andreas Rottmann
@ 2003-07-13 22:24     ` Han-Wen Nienhuys
  2003-07-13 22:39       ` Kevin Ryde
  0 siblings, 1 reply; 5+ messages in thread
From: Han-Wen Nienhuys @ 2003-07-13 22:24 UTC (permalink / raw)
  Cc: Alex Thiel, guile-devel

a.rottmann@gmx.at writes:
> Kevin Ryde <user42@zip.com.au> writes:
> 
> > Alex Thiel <stderr@web.de> writes:
> >>
> >> gc-malloc.c: In function `scm_gc_realloc':
> >> gc-malloc.c:323: parse error before `void'
> >> gc-malloc.c:330: `ptr' undeclared (first use in this function)
> >
> > Thanks.  This was a recent change.  I applied a fix.
> >
> >> gcc >= 3.0 works fine.
> >
> > Variables defined in the middle of functions, a la C++, is either a
> > c99-ism or a gcc-ism, not sure which.
> >
> C99, AFAIRC.

Maybe --std=gnu89 should be added by default for GCC 3.x
compilation. Anyone knowledgeable about autoconf willing to do this?

-- 

Han-Wen Nienhuys   |   hanwen@cs.uu.nl   |   http://www.xs4all.nl/~hanwen 


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

* Re: guile-core does not build with gcc-2.95.4
  2003-07-13 22:24     ` Han-Wen Nienhuys
@ 2003-07-13 22:39       ` Kevin Ryde
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Ryde @ 2003-07-13 22:39 UTC (permalink / raw)


Han-Wen Nienhuys <hanwen@cs.uu.nl> writes:
>
> Maybe --std=gnu89 should be added by default for GCC 3.x
> compilation. Anyone knowledgeable about autoconf willing to do this?

Personally I think it's cleaner to keep such things out of the main
configure.in (I think that of -Werror for instance too).  Developers
can add such stuff easily enough.

I like CPPFLAGS for extra flags.  CFLAGS is the right place, but one
can leave that to configure to establish, and instead insinuate extra
stuff by abusing CPPFLAGS.


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


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

end of thread, other threads:[~2003-07-13 22:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-09 20:39 guile-core does not build with gcc-2.95.4 Alex Thiel
2003-07-09 22:03 ` Kevin Ryde
2003-07-13 15:36   ` Andreas Rottmann
2003-07-13 22:24     ` Han-Wen Nienhuys
2003-07-13 22:39       ` Kevin Ryde

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).