Opened 4 years ago

Closed 4 years ago

#15 closed defect (fixed)

Error Generating result Condition (!=zero_t)

Reported by: ajbeach Owned by: Rob Schluntz <rschlunt@…>
Priority: minor Component: cfa-cc
Version: 1.0 Keywords:


Neither of the following two versions compile:

assert( ((result(int, char)){1, 4}) );
result(int, char) pass = {1, 4};

Removing the assert statement causes the code to compile, so the error might be in converting the result to a boolean (?!=? zero_t). The error message generated reads as follows:

/home/ajbeach/cfa-cc/include/cfa/containers/result: In function ‘__checkPredicates__F___1’:
/home/ajbeach/cfa-cc/include/cfa/containers/result:52:160: error: expected identifier before ‘)’ token

Which works out to be about 2987:160 in the -CFA output the following line:

long unsigned int _offsetof_14s_conc_result0[2] = { __builtin_offsetof(struct _conc_result0 , __has_value__b_1), __builtin_offsetof(struct _conc_result0 , ) };

Which does not seem to refer directly to any operation. The next line does refer to the notequal operation.

Change History (1)

comment:1 Changed 4 years ago by Rob Schluntz <rschlunt@…>

Owner: set to Rob Schluntz <rschlunt@…>
Resolution: fixed
Status: newclosed

In 2164637:

don't clone member in conversion of OffsetPackExpr? to OffsetofExpr? [fixes #15]

Note: See TracTickets for help on using tickets.