Skip to content

Non-extern global variable without initializer is not marked as the definition #875

@Vexu

Description

@Vexu

a and b should be equivalent:

extern int a;
int a = 0;

extern int b;
int b;
variable: 'int'
 extern name: a
 definition: 0x7

variable: 'int'
 name: a
 init:
  int_literal: 'int' (value: 0)

variable: 'int'
 extern name: b // missing definition pointing to the decl below

variable: 'int'
 name: b

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions