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.


|