Sun studio warning suppression in tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12500 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-02-20 13:02:21 +00:00
parent a1c931f0a3
commit 77110db863
12 changed files with 83 additions and 6 deletions

View File

@ -8,6 +8,12 @@
%newobject Bar::testFoo; %newobject Bar::testFoo;
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, wbadasg) /* Assigning extern "C" ... */
#endif
%}
%inline %{ %inline %{
class Foo { class Foo {

View File

@ -10,6 +10,12 @@
%include "std_string.i" %include "std_string.i"
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, hidevf)
#endif
%}
%inline %{ %inline %{
#include <cstdio> #include <cstdio>
#include <iostream> #include <iostream>

View File

@ -1,5 +1,11 @@
%module funcptr_cpp %module funcptr_cpp
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#endif
%}
%inline %{ %inline %{
int addByValue(const int &a, int b) { return a+b; } int addByValue(const int &a, int b) { return a+b; }

View File

@ -1,5 +1,11 @@
%module li_std_stream %module li_std_stream
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#endif
%}
%inline %{ %inline %{
struct A; struct A;
%} %}

View File

@ -1,5 +1,11 @@
%module li_std_wstream %module li_std_wstream
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#endif
%}
%inline %{ %inline %{
struct A; struct A;
%} %}
@ -49,6 +55,7 @@
%} %}
%extend std::basic_ostream<wchar_t>{ %extend std::basic_ostream<wchar_t>{
extern "C"
std::basic_ostream<wchar_t>& std::basic_ostream<wchar_t>&
operator<<(const A& a) operator<<(const A& a)
{ {

View File

@ -1,5 +1,11 @@
%module member_funcptr_galore %module member_funcptr_galore
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#endif
%}
%inline %{ %inline %{
namespace FunkSpace { namespace FunkSpace {

View File

@ -1,5 +1,11 @@
%module member_pointer %module member_pointer
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#endif
%}
%inline %{ %inline %{
class Shape { class Shape {
public: public:

View File

@ -1,4 +1,11 @@
%module namespace_spaces %module namespace_spaces
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, wbadasg) /* Assigning extern "C" ... */
#endif
%}
%inline %{ %inline %{
class Foo { class Foo {

View File

@ -1,6 +1,12 @@
// Test cases for classes that do *NOT* result in smart-pointer wrapping // Test cases for classes that do *NOT* result in smart-pointer wrapping
%module smart_pointer_not %module smart_pointer_not
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, arrowrtn) /* Questionable return type for ... */
#endif
%}
%inline %{ %inline %{
struct Foo { struct Foo {
int x; int x;

View File

@ -2,6 +2,13 @@
%module typedef_mptr %module typedef_mptr
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, badargtype2w) /* Formal argument ... is being passed extern "C" ... */
#pragma error_messages (off, wbadinit) /* Using extern "C" ... to initialize ... */
#endif
%}
#if defined(SWIGPYTHON) || defined(SWIGOCAML) #if defined(SWIGPYTHON) || defined(SWIGOCAML)
%inline %{ %inline %{

View File

@ -7,6 +7,12 @@
%warnfilter(SWIGWARN_JAVA_COVARIANT_RET, SWIGWARN_CSHARP_COVARIANT_RET) covariant3; /* Java, C# covariant return types */ %warnfilter(SWIGWARN_JAVA_COVARIANT_RET, SWIGWARN_CSHARP_COVARIANT_RET) covariant3; /* Java, C# covariant return types */
%warnfilter(SWIGWARN_JAVA_COVARIANT_RET, SWIGWARN_CSHARP_COVARIANT_RET) covariant4; /* Java, C# covariant return types */ %warnfilter(SWIGWARN_JAVA_COVARIANT_RET, SWIGWARN_CSHARP_COVARIANT_RET) covariant4; /* Java, C# covariant return types */
%{
#if defined(__SUNPRO_CC)
#pragma error_messages (off, wbadasg) /* Assigning extern "C" ... */
#endif
%}
// //
// Check this example with directors wherever possible. // Check this example with directors wherever possible.
// //

View File

@ -306,14 +306,27 @@ then
fi fi
AC_MSG_RESULT($LINKFORSHARED) AC_MSG_RESULT($LINKFORSHARED)
# Optional CFLAGS used to silence/enhance compiler warnings on some platforms.
AC_MSG_CHECKING(PLATFLAGS)
case $host in
*-*-solaris*) if test "$GCC" = yes;
then PLATFLAGS=
else PLATFLAGS=
# else PLATFLAGS="-errtags=yes" # Need more work as C examples use ld for linking
fi;;
*) PLATFLAGS=
esac
AC_MSG_RESULT($PLATFLAGS)
# Set info about shared libraries. # Set info about shared libraries.
AC_SUBST(SO) AC_SUBST(SO)
AC_SUBST(LDSHARED) AC_SUBST(LDSHARED)
AC_SUBST(CCSHARED) AC_SUBST(CCSHARED)
AC_SUBST(CXXSHARED) AC_SUBST(CXXSHARED)
AC_SUBST(TRYLINKINGWITHCXX) AC_SUBST(TRYLINKINGWITHCXX)
AC_SUBST(LINKFORSHARED)
AC_SUBST(RPATH) AC_SUBST(RPATH)
AC_SUBST(PLATFLAGS)
AC_SUBST(LINKFORSHARED)
# This variation is needed on OS-X because there is no (apparent) consistency in shared library naming. # This variation is needed on OS-X because there is no (apparent) consistency in shared library naming.
# Sometimes .bundle works, but sometimes .so is needed. It depends on the target language # Sometimes .bundle works, but sometimes .so is needed. It depends on the target language
@ -354,11 +367,6 @@ case $host in
*) LUA_SO=$SO;; *) LUA_SO=$SO;;
esac esac
# Optional CFLAGS used to silence compiler warnings on some platforms.
AC_SUBST(PLATFLAGS)
PLATFLAGS=
# Check for specific libraries. Used for SWIG examples # Check for specific libraries. Used for SWIG examples
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX