tinycc-devel
[Top][All Lists]
Advanced

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

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


From: Michael Matz
Subject: Re: [Tinycc-devel] Missing compiler error for ambiguous anon structs
Date: Thu, 2 May 2019 23:37:43 +0200 (CEST)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)

Hi,

On Wed, 1 May 2019, Pitr Kaye wrote:

These ambiguous anon structs compile without error.

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

A compiler error message would make debugging much easier.

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.


Ciao,
Michael.



reply via email to

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