[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Missing compiler error for ambiguous anon structs

From: Pitr Kaye
Subject: Re: [Tinycc-devel] Missing compiler error for ambiguous anon structs
Date: Sat, 4 May 2019 09:09:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Hello Michael,

Yes.  Even the more obviously broken struct definition
  struct S { int x, x; };
is compiled without error.

I'm baffled. Good to know.

Sure, but it also would mean slower parsing (with current data structures 
adding a check that is quadratic in the number of struct members). It's 
generally the case that TCC doesn't deal well with non-conforming source code, 
that's a side effect of it being tiny and quick :) I'm not sure if we want to 
change this.

Thanks for your explanation. Works for me as long as I know what's going on.
I had assumed, to get it almost for free, when computing offsets for structure members.
In doubt, I'd prefer never to compromise on compilation speed. That's
were tcc shines and what makes it outstanding.That`s were the fun is.
Keep it tiny and quick, please.

Perhaps you could add a your explanation to the documentation.

BTW: contrary to the documentation -fms-extensions is switched on by default ( libtcc.c: s->ms_extensions = 1; )
and can be switched off with -fno-ms-extensions

Maybe you can change the default state or update the documentation accordingly.

Bye, Pitr.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]