[llvm-commits] [PATCH] Suppress "user-defined return type in extern C" warning under Clang

Matt Johnson johnso87 at illinois.edu
Tue Feb 14 12:16:28 PST 2012


The attached patch suppresses warnings in 
lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp of the flavor:

ExternalFunctions.cpp:308:14: warning: 'lle_X_atexit' has C-linkage 
specified, but returns user-defined type 'llvm::GenericValue' which is 
incompatible with C [-Wreturn-type]
GenericValue lle_X_atexit(FunctionType *FT,

under clang.  The suppression was already done for Visual Studio.  I 
couldn't immediately find other examples of such warning suppression to 
know the preferred way to do it for clang, so I used push/pop to only 
ignore the warning for the section of the file that defines lle_X_*() .

Comments welcome.
Thanks!
-Matt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ignore_wreturn_type.patch
Type: text/x-patch
Size: 1059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120214/c95f19be/attachment.bin>


More information about the llvm-commits mailing list