unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: guile-devel@gnu.org
Subject: Re: guile-core does not build with gcc-2.95.4
Date: Thu, 10 Jul 2003 08:03:50 +1000	[thread overview]
Message-ID: <87znjns6gp.fsf@zip.com.au> (raw)
In-Reply-To: <m3y8z7wi35.fsf@spock.alex.net> (Alex Thiel's message of "Wed, 09 Jul 2003 22:39:10 +0200")

[-- 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

  reply	other threads:[~2003-07-09 22:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-09 20:39 guile-core does not build with gcc-2.95.4 Alex Thiel
2003-07-09 22:03 ` Kevin Ryde [this message]
2003-07-13 15:36   ` Andreas Rottmann
2003-07-13 22:24     ` Han-Wen Nienhuys
2003-07-13 22:39       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87znjns6gp.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).