Skip to content

Commit

Permalink
gccxml 2009-05-19 (a92214b2)
Browse files Browse the repository at this point in the history
  • Loading branch information
GCC-XML authored and bradking committed May 20, 2009
1 parent a6ba22c commit 56a926d
Show file tree
Hide file tree
Showing 27 changed files with 640 additions and 426 deletions.
20 changes: 20 additions & 0 deletions GCC/gcc/config/i386/winnt-cxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,28 @@ i386_pe_type_dllexport_p (tree decl)

static inline void maybe_add_dllimport (tree decl)
{
/* BEGIN GCC-XML MODIFICATIONS 2009-04-24 */
/* Somehow dllimport ends up on the VAR_DECL for the 'B' vtable:
class A {};
struct __attribute__((dllimport)) B: virtual public A { ~B() {} };
Then 'maybe_emit_vtables' calls 'store_init_value' which eventually
calls 'initializer_constant_valid_p' and 'staticp'. The
DECL_DLLIMPORT_P mark requires runtime initialization of the
vtable, which is not allowed, and results in an ICE.
There is code in "class.c" which removes the dllimport attribute
but it never seems to be called for the vtable VAR_DECL. We
workaround the problem for gccxml by disabling the mark altogether,
as it seems to be used only for code generation. */
#if 0
if (i386_pe_type_dllimport_p (decl))
DECL_DLLIMPORT_P (decl) = 1;
#else
(void)decl;
#endif
/* END GCC-XML MODIFICATIONS 2009-04-24 */
}

void
Expand Down
8 changes: 5 additions & 3 deletions GCC/gcc/cp/decl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,13 @@ coerce_new_type (tree type)
e = 2;
if (args && args != void_list_node)
args = TREE_CHAIN (args);
/* BEGIN GCC-XML MODIFICATIONS (2009/03/02 14:29:19) */
/* BEGIN GCC-XML MODIFICATIONS (2009/03/03 16:31:15) */
/* Ignore whether the native compiler breaks the operator new signature. */
#if 0
pedwarn ("%<operator new%> takes type %<size_t%> (%qT) "
"as first parameter", size_type_node);
#endif
/* END GCC-XML MODIFICATIONS (2009/03/02 14:29:19) */
/* END GCC-XML MODIFICATIONS (2009/03/03 16:31:15) */
}
switch (e)
{
Expand Down Expand Up @@ -3498,7 +3498,9 @@ mark_used (tree decl)

/* BEGIN GCC-XML MODIFICATIONS 2008-03-02 */
if(diagnostic_xml_synthesize_test &&
TREE_CODE (decl) == FUNCTION_DECL && GCCXML_DECL_ERROR (decl))
((TREE_CODE (decl) == FUNCTION_DECL && GCCXML_DECL_ERROR (decl)) ||
(DECL_CLONED_FUNCTION_P (decl) &&
GCCXML_DECL_ERROR (DECL_CLONED_FUNCTION (decl)))))
{
/* This is a method synth test and we recursively encountered a
previously synthesized invalid method. */
Expand Down
32 changes: 18 additions & 14 deletions GCC_XML/KWSys/Base64.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
# define kwsys_ns(x) @KWSYS_NAMESPACE@##x
# define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
#endif
#define kwsysBase64 kwsys_ns(Base64)
#define kwsysBase64_Decode kwsys_ns(Base64_Decode)
#define kwsysBase64_Decode3 kwsys_ns(Base64_Decode3)
#define kwsysBase64_Encode kwsys_ns(Base64_Encode)
#define kwsysBase64_Encode1 kwsys_ns(Base64_Encode1)
#define kwsysBase64_Encode2 kwsys_ns(Base64_Encode2)
#define kwsysBase64_Encode3 kwsys_ns(Base64_Encode3)
#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsysBase64 kwsys_ns(Base64)
# define kwsysBase64_Decode kwsys_ns(Base64_Decode)
# define kwsysBase64_Decode3 kwsys_ns(Base64_Decode3)
# define kwsysBase64_Encode kwsys_ns(Base64_Encode)
# define kwsysBase64_Encode1 kwsys_ns(Base64_Encode1)
# define kwsysBase64_Encode2 kwsys_ns(Base64_Encode2)
# define kwsysBase64_Encode3 kwsys_ns(Base64_Encode3)
#endif

#if defined(__cplusplus)
extern "C"
Expand Down Expand Up @@ -106,13 +108,15 @@ kwsysEXPORT unsigned long kwsysBase64_Decode(const unsigned char *input,
#if !defined(KWSYS_NAMESPACE)
# undef kwsys_ns
# undef kwsysEXPORT
# undef kwsysBase64
# undef kwsysBase64_Decode
# undef kwsysBase64_Decode3
# undef kwsysBase64_Encode
# undef kwsysBase64_Encode1
# undef kwsysBase64_Encode2
# undef kwsysBase64_Encode3
# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsysBase64
# undef kwsysBase64_Decode
# undef kwsysBase64_Decode3
# undef kwsysBase64_Encode
# undef kwsysBase64_Encode1
# undef kwsysBase64_Encode2
# undef kwsysBase64_Encode3
# endif
#endif

#endif
8 changes: 4 additions & 4 deletions GCC_XML/KWSys/CommandLineArguments.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ unsigned int CommandLineArguments::GetLastArgument()
void CommandLineArguments::GenerateHelp()
{
kwsys_ios::ostringstream str;

// Collapse all arguments into the map of vectors of all arguments that do
// the same thing.
CommandLineArguments::Internal::CallbacksMap::iterator it;
Expand Down Expand Up @@ -660,7 +660,7 @@ void CommandLineArguments::GenerateHelp()
skip = cc;
}
}
str.write(ptr, skip);
str.write(ptr, static_cast<kwsys_ios::streamsize>(skip));
str << kwsys_ios::endl;
ptr += skip;
len -= skip;
Expand Down Expand Up @@ -701,7 +701,7 @@ void CommandLineArguments::PopulateVariable(
int* variable, const kwsys_stl::string& value)
{
char* res = 0;
*variable = strtol(value.c_str(), &res, 10);
*variable = static_cast<int>(strtol(value.c_str(), &res, 10));
//if ( res && *res )
// {
// Can handle non-int
Expand Down Expand Up @@ -759,7 +759,7 @@ void CommandLineArguments::PopulateVariable(
kwsys_stl::vector<int>* variable, const kwsys_stl::string& value)
{
char* res = 0;
variable->push_back(strtol(value.c_str(), &res, 10));
variable->push_back(static_cast<int>(strtol(value.c_str(), &res, 10)));
//if ( res && *res )
// {
// Can handle non-int
Expand Down
3 changes: 3 additions & 0 deletions GCC_XML/KWSys/Configure.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
#endif

/* Whether kwsys namespace is "kwsys". */
#define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@

/* If we are building a kwsys .c or .cxx file, suppress the Microsoft
deprecation warnings. */
#if defined(KWSYS_NAMESPACE)
Expand Down
3 changes: 0 additions & 3 deletions GCC_XML/KWSys/Configure.hxx.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
/* Include C configuration. */
#include <@KWSYS_NAMESPACE@/Configure.h>

/* Whether kwsys namespace is "kwsys". */
#define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@

/* Whether ANSI C++ stream headers are to be used. */
#define @KWSYS_NAMESPACE@_IOS_USE_ANSI @KWSYS_IOS_USE_ANSI@

Expand Down
41 changes: 23 additions & 18 deletions GCC_XML/KWSys/FundamentalType.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@
# define kwsys_ns(x) @KWSYS_NAMESPACE@##x
# define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
#endif
#define kwsysFundamentalType kwsys_ns(FundamentalType)
#define kwsysFundamentalType_Int8 kwsys_ns(FundamentalType_Int8)
#define kwsysFundamentalType_UInt8 kwsys_ns(FundamentalType_UInt8)
#define kwsysFundamentalType_Int16 kwsys_ns(FundamentalType_Int16)
#define kwsysFundamentalType_UInt16 kwsys_ns(FundamentalType_UInt16)
#define kwsysFundamentalType_Int32 kwsys_ns(FundamentalType_Int32)
#define kwsysFundamentalType_UInt32 kwsys_ns(FundamentalType_UInt32)
#define kwsysFundamentalType_Int64 kwsys_ns(FundamentalType_Int64)
#define kwsysFundamentalType_UInt64 kwsys_ns(FundamentalType_UInt64)

#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsysFundamentalType kwsys_ns(FundamentalType)
# define kwsysFundamentalType_Int8 kwsys_ns(FundamentalType_Int8)
# define kwsysFundamentalType_UInt8 kwsys_ns(FundamentalType_UInt8)
# define kwsysFundamentalType_Int16 kwsys_ns(FundamentalType_Int16)
# define kwsysFundamentalType_UInt16 kwsys_ns(FundamentalType_UInt16)
# define kwsysFundamentalType_Int32 kwsys_ns(FundamentalType_Int32)
# define kwsysFundamentalType_UInt32 kwsys_ns(FundamentalType_UInt32)
# define kwsysFundamentalType_Int64 kwsys_ns(FundamentalType_Int64)
# define kwsysFundamentalType_UInt64 kwsys_ns(FundamentalType_UInt64)
#endif

/* The size of fundamental types. Types that do not exist have size 0. */
#define @KWSYS_NAMESPACE@_SIZEOF_CHAR @KWSYS_SIZEOF_CHAR@
Expand Down Expand Up @@ -114,15 +117,17 @@ typedef unsigned __int64 kwsysFundamentalType_UInt64;
#if !defined(KWSYS_NAMESPACE)
# undef kwsys_ns
# undef kwsysEXPORT
# undef kwsysFundamentalType
# undef kwsysFundamentalType_Int8
# undef kwsysFundamentalType_UInt8
# undef kwsysFundamentalType_Int16
# undef kwsysFundamentalType_UInt16
# undef kwsysFundamentalType_Int32
# undef kwsysFundamentalType_UInt32
# undef kwsysFundamentalType_Int64
# undef kwsysFundamentalType_UInt64
# if !defined(KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsysFundamentalType
# undef kwsysFundamentalType_Int8
# undef kwsysFundamentalType_UInt8
# undef kwsysFundamentalType_Int16
# undef kwsysFundamentalType_UInt16
# undef kwsysFundamentalType_Int32
# undef kwsysFundamentalType_UInt32
# undef kwsysFundamentalType_Int64
# undef kwsysFundamentalType_UInt64
# endif
#endif

/* If building a C or C++ file in kwsys itself, give the source file
Expand Down
6 changes: 3 additions & 3 deletions GCC_XML/KWSys/Glob.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -380,13 +380,13 @@ bool Glob::FindFiles(const kwsys_stl::string& inexpr)
}
kwsys_stl::string fexpr = expr;

int skip = 0;
int last_slash = 0;
kwsys_stl::string::size_type skip = 0;
kwsys_stl::string::size_type last_slash = 0;
for ( cc = 0; cc < expr.size(); cc ++ )
{
if ( cc > 0 && expr[cc] == '/' && expr[cc-1] != '\\' )
{
last_slash = static_cast<int>(cc);
last_slash = cc;
}
if ( cc > 0 &&
(expr[cc] == '[' || expr[cc] == '?' || expr[cc] == '*') &&
Expand Down
40 changes: 22 additions & 18 deletions GCC_XML/KWSys/MD5.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@
# define kwsys_ns(x) @KWSYS_NAMESPACE@##x
# define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
#endif
#define kwsysMD5 kwsys_ns(MD5)
#define kwsysMD5_s kwsys_ns(MD5_s)
#define kwsysMD5_New kwsys_ns(MD5_New)
#define kwsysMD5_Delete kwsys_ns(MD5_Delete)
#define kwsysMD5_Initialize kwsys_ns(MD5_Initialize)
#define kwsysMD5_Append kwsys_ns(MD5_Append)
#define kwsysMD5_Finalize kwsys_ns(MD5_Finalize)
#define kwsysMD5_FinalizeHex kwsys_ns(MD5_FinalizeHex)
#define kwsysMD5_DigestToHex kwsys_ns(MD5_DigestToHex)
#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# define kwsysMD5 kwsys_ns(MD5)
# define kwsysMD5_s kwsys_ns(MD5_s)
# define kwsysMD5_New kwsys_ns(MD5_New)
# define kwsysMD5_Delete kwsys_ns(MD5_Delete)
# define kwsysMD5_Initialize kwsys_ns(MD5_Initialize)
# define kwsysMD5_Append kwsys_ns(MD5_Append)
# define kwsysMD5_Finalize kwsys_ns(MD5_Finalize)
# define kwsysMD5_FinalizeHex kwsys_ns(MD5_FinalizeHex)
# define kwsysMD5_DigestToHex kwsys_ns(MD5_DigestToHex)
#endif

#if defined(__cplusplus)
extern "C"
Expand Down Expand Up @@ -91,15 +93,17 @@ kwsysEXPORT void kwsysMD5_DigestToHex(unsigned char const digest[16],
#if !defined(KWSYS_NAMESPACE)
# undef kwsys_ns
# undef kwsysEXPORT
# undef kwsysMD5
# undef kwsysMD5_s
# undef kwsysMD5_New
# undef kwsysMD5_Delete
# undef kwsysMD5_Initialize
# undef kwsysMD5_Append
# undef kwsysMD5_Finalize
# undef kwsysMD5_FinalizeHex
# undef kwsysMD5_DigestToHex
# if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
# undef kwsysMD5
# undef kwsysMD5_s
# undef kwsysMD5_New
# undef kwsysMD5_Delete
# undef kwsysMD5_Initialize
# undef kwsysMD5_Append
# undef kwsysMD5_Finalize
# undef kwsysMD5_FinalizeHex
# undef kwsysMD5_DigestToHex
# endif
#endif

#endif
Loading

0 comments on commit 56a926d

Please sign in to comment.