Skip to content

Inconsistent tagof return for _:. #160

@Y-Less

Description

@Y-Less
Tagof(var, tag1 = tagof (var))
{
	new tag2 = tagof (var);
	printf("%d %x", var, tag1);
	printf("%d %x", var, tag2);
}

main()
{
	Tagof(4);
}

Expected output should be something consistent, either:

4 0
4 0

Or:

4 80000000
4 80000000

Most tags seem to have the top bit set, but in some of my experiments, the default _: tag was just 0 - which is quite nice in some ways to distinguish it from other tags. However, the actual output is both:

4 0
4 80000000

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions