arocc icon indicating copy to clipboard operation
arocc copied to clipboard

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

Open Vexu opened this issue 6 months ago • 0 comments

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

Vexu avatar Jul 13 '25 12:07 Vexu