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

David Blaikie dblaikie at gmail.com
Tue Feb 14 12:28:21 PST 2012


[+aaron who added this warning & was already looking into the fix for LLVM]

Perhaps you've got the right fix - but at least Aaron won't keep
working on it redundantly. It looks reasonable to me.

On Tue, Feb 14, 2012 at 12:16 PM, Matt Johnson <johnso87 at illinois.edu> wrote:
> 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
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list