https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94840

            Bug ID: 94840
           Summary: Extern var not defined but compiles
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dudu.arbel at ilrd dot co.il
  Target Milestone: ---

The following code compiles successfully. 
Linker should, of course, fail:

extern int a;

void foo(void)
{
    int a = 3;
    a += 5;
}

int main()
{
    foo();
    return 0;
}

Reply via email to