[cfe-commits] [PATCH] Correctly generate K&R-style function definitions with promotable types

Eli Friedman eli.friedman at gmail.com
Sun Aug 24 16:00:59 PDT 2008


Patch per subject.  Deals with cases like the following correctly:

int a();
int a(x) short x; {return x;}

The short is supposed to promote to int for the function signature.

There's a regression here because clang is now more strict about
checking function type compatibility, but this isn't a new issue.
Note that even ignoring the new error, this bug leads to incorrect
codegen.

I don't especially like the patch as written... the whole area is a
bit messy.  That said, I don't have any good ideas for how to improve
it.  Anyone have any suggestions?

-Eli
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tt.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20080824/4d1a3b09/attachment.txt>


More information about the cfe-commits mailing list