Custom Query (145 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (40 - 42 of 145)

Ticket Resolution Summary Owner Reporter
#144 fixed break target on try fails pabuhr
Description
int main() {
  T: try {
        break T;
    } finally {}
}
test.cfa:3:1 error: 'break' target must be an enclosing control structure: T
#142 fixed constant expression problem pabuhr
Description

The following works with gcc but fails with CFA.

struct S {
    int i;
};
enum { X = sizeof(struct S) };
int x[X];

cfa test5.cfa
CFA Version 1.0.0 (debug)
test5.cfa:4:1 error: Non-constexpr in initialization of enumerator: X: const instance of enum __anonymous0 with body 1 with initializer (not constructed)
  Simple Initializer: Generated Cast of:
    Sizeof Expression on: instance of struct S with body 1
  ... to:
    signed int
  ... with environment:
    Types:
    Non-types:
#137 fixed Better lvalue handling a3moss
Description

lvalue isn't a qualifier anymore in Cforall, yet gets treated like one. There are 5 places in AST/Expr.cpp where a type is cloned just to add an lvalue qualifier (search add_qualifiers).

It might be preferable to make a new LvalueType that is essentially a readonly<Type> that just adds lvalue to its qualifiers (this might involve making Type::qualifiers a getter function rather than a field).

Another approach would be to store lvalue-ness on expressions rather than types, but that would be a more involved change. Both are worth investigating.

Note: See TracQuery for help on using queries.