[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] accepting a wrong scruct declaration
From: |
Michael Matz |
Subject: |
Re: [Tinycc-devel] accepting a wrong scruct declaration |
Date: |
Wed, 1 Apr 2015 15:09:31 +0200 (CEST) |
User-agent: |
Alpine 2.11 (LSU 23 2013-08-11) |
Hi,
On Sun, 29 Mar 2015, Sergey Korshunoff wrote:
> struct A
> {
> struct B {
> int f1;
> int f2;
> };
> };
> int main()
> {
> struct A a;
> a.f1 = 16;
> a.f2 = 32;
> }
>
> A tcc compiler must not accept this program because a struct B is only
> a type declaration and not a member declaration. Any tips how to fix
> this?
Careful. The above example is non-standard C, but must be accepted as a
microsoft extension. GCCs option for that is -fms-extensions . As TCC
is also used on windows I expect not accepting it to lead to failures
there.
Ciao,
Michael.
- Re: [Tinycc-devel] accepting a wrong scruct declaration,
Michael Matz <=