From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bf856aff026ed05 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!e9g2000prf.googlegroups.com!not-for-mail From: Nasser Abbasi Newsgroups: comp.lang.ada Subject: Re: C2Ada port to linux updated. Date: Tue, 14 Aug 2007 19:14:37 -0700 Organization: http://groups.google.com Message-ID: <1187144077.372577.38190@e9g2000prf.googlegroups.com> References: <1187000082.276474.188160@g12g2000prg.googlegroups.com> <1187066466.723133.18140@z24g2000prh.googlegroups.com> NNTP-Posting-Host: 68.5.76.154 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1187144081 7283 127.0.0.1 (15 Aug 2007 02:14:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 15 Aug 2007 02:14:41 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.3) Gecko/20061201 Firefox/2.0.0.3 (Ubuntu-feisty),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: e9g2000prf.googlegroups.com; posting-host=68.5.76.154; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1446 Date: 2007-08-14T19:14:37-07:00 List-Id: On Aug 14, 5:01 pm, Keith Thompson wrote: > Keith Thompson writes: > > "Nasser Abbasi" writes: > > [...] > >> It took me a day to make it compile/run on Linux. The main problem was with > >> using _Bool. They added _Bool data type in C99, for some reason ( I am no > >> gcc expert), the current gcc 4.1 compiler does not have and it > >> does not know about _Bool, and _Bool is used in many places in the code. > > [...] > > > Perhaps you just need to update your gcc. gcc 4.1.1 does support > > and _Bool. > > That's odd. I just tried a small test program, and gcc versions 3.2 > and 4.0.0 also support and _Bool. > > Here's the test case: > > #include > _Bool obj1; > bool obj2; > > Save it as, say, "foo.c", feed it to "gcc -c", and see what happens. > Perhaps your gcc is configured and/or installed incorrectly. > > -- > Keith Thompson (The_Other_Keith) ks...@mib.org > San Diego Supercomputer Center <*> > "We must do something. This is something. Therefore, we must do this." > -- Antony Jay and Jonathan Lynn, "Yes Minister" hi Ken; Yes, the above works, but the c2ada uses typedefs and it includes _Bool in there, and that is where the problem occur. I've just reduced this problem to this simple example to help illustrate it: gcc -c il.h il.h:5: error: expected identifier before '_Bool' $ cat il.h #include typedef enum { _Bool, /* cvt to Boolean, Ada only, unary */ _UnBool, /* cvt bool->int, Ada only, unary */ } node_kind_t; $ gcc -c -std=c99 il.h il.h:5: error: expected identifier before '_Bool' $ gcc -c -ansi il.h il.h:5: error: expected identifier before '_Bool' $ gcc -c -std=gnu89 il.h il.h:5: error: expected identifier before '_Bool' nabbasi@my-desktop:~/try$ gcc --version gcc (GCC) 4.1.3 20070403 for GNAT GPL 2007 (20070402) Could you please try the above on your system? may be my gcc installation is bad. I am using Ubuntu nabbasi@my-desktop:~/try$ uname -a Linux my-desktop 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686 GNU/Linux Nasser