[Top][All Lists]

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

Re: [Tinycc-devel] Segmentation fault when using “extern i;” to access

From: Michael Matz
Subject: Re: [Tinycc-devel] Segmentation fault when using “extern i;” to access homonym variable from inside “for (int i;...”
Date: Mon, 18 Mar 2019 06:02:02 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)


On Thu, 7 Mar 2019, Pascal Cuoq wrote:

The problematic input is as follows. Note that in this case this is a
well-formed compilation unit:

$ cat extern_local.i
int main(void) {
  char a[50];
  for (int i;;) {
    extern i;

Wow, thanks for the report. This specific case has never worked at all in TCC, local extern decls generally did work, but not if they shadowed another local variable. Fixed in mob.


reply via email to

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