Skip to content

Cannot Initalize an Array That Has Length uniqueCount() #5

@bradjc

Description

@bradjc

I came across an "internal error" in nesC when trying to initalize an array that has a length set by the uniqueCount() function. This snippet reproduces the error:

module TestP { }
implementation {
  char arr[uniqueCount("UNIQ_ID")] = {1};
}

Obviously here uniqueCount("UNIQ_ID") is zero, but the error still happens in a real project.

For reference, here is the error output I get:

nesc1: cval.c:268: cval_sint_value: Assertion `0' failed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions