tinyos / nesc

Master nesc repository
GNU General Public License v2.0
100 stars 53 forks source link

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

Open bradjc opened 11 years ago

bradjc commented 11 years ago

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.