[cfe-dev] Crash in codegen with incompatible pointers

Eli Friedman eli.friedman at gmail.com
Sat Jan 26 00:03:09 CST 2008


Simple test:
int a() {
int i; short j;
float* k = 1 ? &i : &j;
}

This crashes in codegen because clang warns, and then neglects to
actually make the types match.

Patch attached.  As noted, I deciced to coerce both pointers to void*
because that's what gcc does.

-Eli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: incompatptrfix.txt
Url: http://lists.cs.uiuc.edu/pipermail/cfe-dev/attachments/20080125/e0ed63aa/attachment.txt 


More information about the cfe-dev mailing list