[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Compiling with --std=c99 supported?
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Compiling with --std=c99 supported? |
Date: |
Sun, 8 Sep 2013 23:59:55 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Sep 08, 2013 at 11:52:01PM +0200, Kristian Lein-Mathisen wrote:
> Hi there,
>
> I came across something I think might be a bug. While I don't have a deep
> understanding of what c99 and gnu99 really mean, I noted that this happens
> on my 64bit system:
>
> $ csc -C --std=c99 c99test.scm && ./c99test
> In file included from c99test.c:11:0:
> /usr/include/chicken/chicken.h:1532:1: error: unknown type name ‘sigjmp_buf’
> C_varextern C_TLS sigjmp_buf C_restart;
> ^
>
> Error: shell command terminated with non-zero exit status 256: gcc
> c99test.c -o c99test.o -c -fno-strict-aliasing -fwrapv
> -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer
> --std=c99 -I"/usr/include/chicken"
>
> Is chicken supposed to be compilable with c99?
I'm afraid those options are like the retarded "-ansi" option, which
utterly disables any POSIX extensions, accepting only vanilla ANSI C
code. And indeed, the docs for -ansi say "in C mode, this is equivalent
to --std=c90".
IIRC, the way to make this work again is to selectively re-enable POSIX
extensions by passing some flags like -DPOSIX and such.
If you can, try to avoid these options unless you're prepared to dig
deep into compatibility differences.
Cheers,
Peter
--
http://www.more-magic.net