================
Comment at: lib/Sema/SemaDecl.cpp:7694
@@ +7693,3 @@
+      FT->getResultType()->isNullPtrType())
+    FD->setHasImplicitReturnZero(true);
+
----------------
David Majnemer wrote:
> Reid Kleckner wrote:
> > MSVC doesn't do this for DllMain, which returns BOOL (typedefed to int =/).
> It does this on my machine.
> 
> Like so:
> int DllMain() {}
> 
> I get:
> DllMain PROC
> 
>     xor eax, eax
>     ret 0
> DllMain ENDP
That behavior isn't very useful, though, because DllMain is supposed to return 
TRUE on success and FALSE on failure.  If a user tries to compile an empty 
DllMain with clang, we won't warn them, and they'll get weird runtime failures 
where LoadLibrary returns NULL.  I'd rather have the warning than be compatible 
on this fine codegen detail.


http://llvm-reviews.chandlerc.com/D1683
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to