Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers LCC > Re: lcc and c99...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 15 of 21 Topic 977 of 1070
Post > Topic >>

Re: lcc and c99 conformance

by Ben Bacarisse <ben.usenet@[EMAIL PROTECTED] > Oct 14, 2007 at 11:51 PM

jacob navia <jacob@[EMAIL PROTECTED]
> writes:

> Ben Bacarisse wrote:
>>
>> ---------------- 1
>> int f(int *i) { return *i; }
>>
>> void t(void)
>> {
>>      long l = 0;
>>      f(&l);
>> }
>
> This provokes a warning if the -A option is present.
> Otherwise it doesn't. MSVC doesn't warn either by default.

I thought -ansic was the flag to request standards mode.  What is
"-A"?

>> ---------------- 2
>> struct s { int a; } x = { .a = 1 };
>> ---------------- 3
>> #include <stdio.h>
>>
>> int main(void)
>> {
>>      int x[] = { [2] = 3 };
>>      printf("%zu\n", sizeof x);
>>      return 0;
>> }
>
> Not implemented

That was my point.  You'd said "all that is implemented in lcc-win32"
in a reply to a message that included C99's new initializer syntax.
 
>> ---------------- 4
>> #include <stdio.h>
>>
>> int main(void)
>> {
>>      for (static int i = 0; i < 10; i++)
>> 	  printf("%d\n", i);
>> }
> lcc accepts the static keyword. Why should be this forbidden?
> Can you tell me in which place of the standard???

6.8.5 p3 but see also my other reply to your further message about
this.

>> ---------------- 5
>> #include <stdio.h>
>>
>> void f(int i)
>> {
>>      printf("%d\n", i);
>> }
>>
>> int main(void)
>> {
>>      f((int [2]){42, 43}[1]);
>>      return 0;
>> }
> Not implemented
>> ---------------- 6
>> #include <stdio.h>
>>
>> int main(void)
>> {
>>      printf("%zu\n", sizeof (int [2]){42, 43});
>>      return 0;
>> }
> Not implemented

Fine.  You seemed to be suggesting the C99's compound literals were
implemented so I thought this was a bug re****t.  If you knew you still
had some corner cases to finish, you could have said "lcc-win32
implements most of the new compund literals".

>> Jacob, do you have a recipe to ensure the linking is against your
>> libraries yet?  Ideally, an example of making a statically linked
>> binary.  I was unable to do that.  Using gcc to link as you suggest
>> means I always get some glibc symbols referenced rather than your
>> libraries.
>
> I thought that my libraries aren't so much useful under linux,
> since glibc has a complete implementation of the C99 libraries...

No, that is fine.  Since full libraries seemed to be included, I
wanted to be sure I was doing the right thing.  Linking against
another implementation's library is not an obviously fair test for a
compiler, so I wanted to be sure that you thought glibc is OK to use.

May I add another?  You allow constant expressions to use the comma
operator which is, I think, illegal syntax in ISO C.

-- 
Ben.
 




 21 Posts in Topic:
lcc and c99 conformance
"Wade Ward" <  2007-09-10 04:24:34 
Re: lcc and c99 conformance
"Antoine Leca"   2007-09-12 14:43:51 
Re: lcc and c99 conformance
jacob navia <jacob@[EM  2007-09-12 15:06:48 
Re: lcc and c99 conformance
"Antoine Leca"   2007-09-12 19:13:44 
Re: lcc and c99 conformance
"Wade Ward" <  2007-09-12 17:11:38 
Re: lcc and c99 conformance
jacob navia <jacob@[EM  2007-09-12 15:05:22 
Re: lcc and c99 conformance
"Wade Ward" <  2007-09-12 17:22:09 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-14 19:03:20 
Re: lcc and c99 conformance
jacob navia <jacob@[EM  2007-10-14 20:21:16 
Re: lcc and c99 conformance
CBFalconer <cbfalconer  2007-10-14 20:45:58 
Re: lcc and c99 conformance
jacob navia <jacob@[EM  2007-10-14 20:45:49 
Re: lcc and c99 conformance
"Charlie Gordon"  2007-10-15 13:14:47 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-14 23:15:08 
Re: lcc and c99 conformance
"Antoine Leca"   2007-10-15 17:51:03 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-14 23:51:23 
Re: lcc and c99 conformance
"Antoine Leca"   2007-10-15 17:38:29 
Re: lcc and c99 conformance
jacob navia <jacob@[EM  2007-10-15 18:03:07 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-15 12:43:44 
Re: lcc and c99 conformance
"Charlie Gordon"  2007-10-15 17:17:43 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-15 18:31:06 
Re: lcc and c99 conformance
Ben Bacarisse <ben.use  2007-10-15 18:44:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 7 12:58:24 CDT 2008.