unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Andreas Vögele" <voegelas@gmx.net>
Cc: bug-guile@gnu.org
Subject: Re: More problems on HP-UX ... 4
Date: Wed, 28 Apr 2004 09:43:24 +0200	[thread overview]
Message-ID: <BA795DE8-98E7-11D8-9CE4-000D93673682@gmx.net> (raw)
In-Reply-To: <8765bl9ewb.fsf@zip.com.au>

Kevin Ryde writes:

> Andreas Vögele <voegelas@gmx.net> writes:
>>
>> It seems that alloca.h must be included on HP-UX even when Guile is
>> built with GCC.
>>
>> eval.c: In function `deval':
>> eval.c:2910: warning: implicit declaration of function `alloca'
>
> That's odd, it's meant to be a builtin outside of strict c89 or c99
> mode.

__builtin_alloca is available but not alloca.

Actually, /usr/include/alloca.h contains the following lines on HP-UX:

#ifndef alloca
#  define alloca(x) __builtin_alloca(x)
#endif

> A #define to __builtin_alloca might be better than alloca.h.

Yes, that's much better than to rely on the fact that GCC and HP's 
compiler happen to provide the same builtin.

Moreover, it seems that the alloca problem isn't HP specific at all. I 
also get a warning when I compile the following program under Mac OS X 
with GCC 3.3 and -Wall:

int
main(void)
{
         char *p = alloca (20);
         *p = 0;
         return 0;
}

allocatest.c: In function `main':
allocatest.c:4: warning: implicit declaration of function `alloca'

What about the following code?

#ifndef __GNUC__
...
#else
# ifndef alloca
#  define alloca(x) __builtin_alloca(x)
# endif
#endif



_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


  reply	other threads:[~2004-04-28  7:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 21:30 More problems on HP-UX Andreas Vögele
2004-04-27 22:41 ` More problems on HP-UX ... 3 Kevin Ryde
2004-05-01 12:55   ` Andreas Vögele
2004-05-01 20:59     ` Kevin Ryde
2004-05-02  7:06       ` Andreas Vögele
2004-05-02 22:56         ` Kevin Ryde
2004-04-27 22:51 ` More problems on HP-UX ... 7 Kevin Ryde
2004-04-28  7:19   ` Andreas Vögele
2004-04-27 23:04 ` More problems on HP-UX ... 6 Kevin Ryde
2004-04-28  7:09   ` Andreas Vögele
2004-04-30 23:27     ` Kevin Ryde
2004-04-27 23:31 ` More problems on HP-UX ... 4 Kevin Ryde
2004-04-28  7:43   ` Andreas Vögele [this message]
2004-04-28 21:27     ` Andreas Vögele
2004-05-09  0:47       ` Kevin Ryde
2004-05-09 16:34         ` Andreas Vögele
2004-04-28  0:09 ` More problems on HP-UX ... 1 Kevin Ryde
2004-04-28  6:10   ` Andreas Vögele
2004-04-28 21:25     ` Andreas Vögele
2004-04-28  0:13 ` More problems on HP-UX ... 2 Kevin Ryde
2004-04-28  6:36   ` Andreas Vögele
2004-04-30 23:40     ` Kevin Ryde
2004-05-19  0:03       ` Kevin Ryde
2004-05-24 18:40       ` Marius Vollmer
2004-04-28  0:36 ` More problems on HP-UX ... macos Kevin Ryde
2004-04-28  7:59   ` Andreas Vögele

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=BA795DE8-98E7-11D8-9CE4-000D93673682@gmx.net \
    --to=voegelas@gmx.net \
    --cc=bug-guile@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).