<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Nov 26, 2008, at 10:00 AM, Brian Watt wrote:</div><blockquote type="cite"><font size="2" face="sans-serif">In clang is it possible to declare C-language function prototypes for overloaded functions even though it is not C-language legal. It's because I see that GLSL provides something like this, and I'm wondering if clang does too and how to express it either through command line argument or language attributes, etc.?</font> </blockquote><blockquote type="cite"><br><font size="2" face="sans-serif">int f(int, int);</font> <br><font size="2" face="sans-serif">float f(float, float);</font> <br><font size="2" face="sans-serif">int g() {</font> <br><font size="2" face="sans-serif">  float x = f(1.0f, 2.0f);</font> <br><font size="2" face="sans-serif">}</font> <br></blockquote></div><br><div>Clang recently got support for overloading in C++, at least at the semantic  analysis level.  It doesn't do name mangling at codegen time, so I don't think code generation will work properly for overloading yet.  It is theoretically possible to extend this to C, but it would be better to just use C++ mode.</div><div><br></div><div>-Chris</div></body></html>