Custom Query (145 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (16 - 18 of 145)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Ticket Resolution Summary Owner Reporter
#17 fixed Can't assign 0 to function pointer Rob Schluntz <rschlunt@…> Thierry Delisle
Description

This code crashes the compiler:

int main() {
	int (*foo)(int) = 0;
}
#192 fixed Can't catch exception raised by default resumption handler of another exception mlbrooks
Description
#include <exception.hfa>

TRIVIAL_EXCEPTION( A );
TRIVIAL_EXCEPTION( B );

void defaultResumptionHandler( B & ) {
    printf("DRH B\n");
}

void defaultResumptionHandler( A & ) {
    printf("DRH A\n");
    throwResume (B){};
}

int main() {
    try {    
        throwResume (A){};
    } catchResume (B *) {
        printf("caught B\n");
    }
}

Expect

DRH A
caught B

Actual

DRH A
DRH B
#223 fixed Cannot Convert Function Pointer to Bool ajbeach
Description

Actually there is a way which is:

bool variable = functionPointer != (ReturnType (*)(ParameterType))0;

I guess a more accurate name would be "None of the initially obvious methods of converting a function pointer to a Boolean work and the one way that does is excessively complex" but that is wordy.

The "initially obvious" solutions started with simple assignment, which works in C, but when that failed I tried != with 0 and 0p and those did not work either.

I believe this is more likely to be from missing functions in the prelude.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Note: See TracQuery for help on using queries.