Custom Query (145 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (91 - 93 of 145)

Ticket Owner Reporter Resolution Summary
#41 Rob Schluntz <rschlunt@…> Thierry Delisle fixed Duplicate function on generic specialisation
Description
forall( dtype T )
struct ptr_t {
	T * ptr;
};

int foo( ptr_t( int ) p ) {
	return 3;
}

int foo( ptr_t( float ) p ) {
	return 4;
}

yields

test.c:10:1 error: duplicate function definition for foo: function
  with parameters
    p: instance of struct ptr_t 
      with parameters
        float

  returning 
    _retval_foo:       Attribute with name: unused
signed int
  with body 
    CompoundStmt
      Return Statement, returning: 
          constant expression (4 4: signed int)

#42 Rob Schluntz <rschlunt@…> Thierry Delisle fixed Generic index
Description
forall( dtype T )
struct ptr_t {
	T * ptr;
};

forall( dtype T | sized( T ) )
T& ?[?]( ptr_t( T ) & this, ptrdiff_t idx ) {
	return this.ptr[idx];
}

yields

test.c: In function ‘___operator_index__A0_1_0_0__FRd0_R6sptr_tl__1’:
test.c:22:56: warning: dereferencing ‘void *’ pointer
 }
                                                        ^
test.c:22:5: error: invalid use of void expression
 }
#47 Rob Schluntz Rob Schluntz fixed Constructors are not generated when struct has union or enum member
Description
enum state_t { WAITFOR, CALL, BARGE };
struct global_t {
  state_t state;
};

void ?{} ( global_t & this ) {}

int main() {
  global_t x;
}
Note: See TracQuery for help on using queries.