Commit 00fbd2dd by Nathan Sidwell Committed by Nathan Sidwell

[PR c++/82836] Fixe testcase

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01515.html
	* g++.dg/pr82836.C: Fix for c++17.

From-SVN: r254881
parent f432e4fc
2017-11-17 Nathan Sidwell <nathan@acm.org>
* g++.dg/pr82836.C: Fix for c++17.
2017-11-17 Tamar Christina <tamar.christina@arm.com> 2017-11-17 Tamar Christina <tamar.christina@arm.com>
PR target/82641 PR target/82641
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
namespace std { namespace std {
typedef long unsigned size_t; typedef long unsigned size_t;
inline namespace __cxx11 {} inline namespace __cxx11 {}
double abs() {} double abs() {return 0;}
__int128 abs(__int128 ) {} __int128 abs(__int128 ) {return 0;}
__float128 abs(__float128 ) {} __float128 abs(__float128 ) {return 0;}
#pragma weak pthread_create #pragma weak pthread_create
...@@ -82,37 +82,37 @@ namespace std { ...@@ -82,37 +82,37 @@ namespace std {
typedef char char_type; typedef char char_type;
typedef int int_type; typedef int int_type;
void assign() {} void assign() {}
bool eq() {} bool eq() {return 0;}
bool lt() {} bool lt() {return 0;}
int compare() {} int compare() {return 0;}
size_t length() {} size_t length() {return 0;}
char_type find() {} char_type find() {return 0;}
char_type move() {} char_type move() {return 0;}
char_type copy() {} char_type copy() {return 0;}
char_type assign(char_type ) {} char_type assign(char_type ) {return 0;}
char_type to_char_type() {} char_type to_char_type() {return 0;}
int_type to_int_type() {} int_type to_int_type() {return 0;}
bool eq_int_type() {} bool eq_int_type() {return 0;}
int_type eof() {} int_type eof() {return 0;}
int_type not_eof() {} int_type not_eof() {return 0;}
}; };
template <> struct char_traits< wchar_t > { template <> struct char_traits< wchar_t > {
typedef wchar_t char_type; typedef wchar_t char_type;
typedef int int_type; typedef int int_type;
void assign() {} void assign() {}
bool eq() {} bool eq() {return 0;}
bool lt() {} bool lt() {return 0;}
int compare() {} int compare() {return 0;}
size_t length() {} size_t length() {return 0;}
char_type find() {} char_type find() {return 0;}
char_type move() {} char_type move() {return 0;}
char_type copy() {} char_type copy() {return 0;}
char_type assign(char_type ) {} char_type assign(char_type ) {return 0;}
char_type to_char_type() {} char_type to_char_type() {return 0;}
int_type to_int_type() {} int_type to_int_type() {return 0;}
bool eq_int_type() {} bool eq_int_type() {return 0;}
int_type eof() {} int_type eof() {return 0;}
int_type not_eof() {} int_type not_eof() {return 0;}
}; };
} }
typedef int uint_least16_t; typedef int uint_least16_t;
...@@ -122,41 +122,41 @@ template <> struct char_traits< char16_t > { ...@@ -122,41 +122,41 @@ template <> struct char_traits< char16_t > {
typedef char16_t char_type; typedef char16_t char_type;
typedef uint_least16_t int_type; typedef uint_least16_t int_type;
void assign() {} void assign() {}
bool eq() {} bool eq() {return false;}
bool lt() {} bool lt() {return false;}
int compare() {} int compare() {return 0;}
size_t length() {} size_t length() {return 0;}
char_type find() {} char_type find() {return 0;}
char_type move() {} char_type move() {return 0;}
char_type copy() {} char_type copy() {return 0;}
char_type assign(char_type ) {} char_type assign(char_type ) {return 0;}
char_type to_char_type() {} char_type to_char_type() {return 0;}
int_type to_int_type() {} int_type to_int_type() {return 0;}
bool eq_int_type() {} bool eq_int_type() {return false;}
int_type eof() {} int_type eof() {return 0;}
int_type not_eof() {} int_type not_eof() {return 0;}
}; };
template <> struct char_traits< char32_t > { template <> struct char_traits< char32_t > {
typedef char32_t char_type; typedef char32_t char_type;
typedef uint_least32_t int_type; typedef uint_least32_t int_type;
void assign() {} void assign() {}
bool eq() {} bool eq() {return false;}
bool lt() {} bool lt() {return false;}
int compare() {} int compare() {return 0;}
size_t length() {} size_t length() {return 0;}
char_type find() {} char_type find() {return 0;}
char_type move() {} char_type move() {return 0;}
char_type copy() {} char_type copy() {return 0;}
char_type assign(char_type ) {} char_type assign(char_type ) {return 0;}
char_type to_char_type() {} char_type to_char_type() {return 0;}
int_type to_int_type() {} int_type to_int_type() {return 0;}
bool eq_int_type() {} bool eq_int_type() {return false;}
int_type eof() {} int_type eof() {return 0;}
int_type not_eof() {} int_type not_eof() {return 0;}
}; };
} }
void *operator new(std::size_t) {} void *operator new(std::size_t) {return (void *)1;}
void *operator new[](std::size_t) {} void *operator new[](std::size_t) {return (void *)1;}
void operator delete(void *){} void operator delete(void *){}
void operator delete[](void *) {} void operator delete[](void *) {}
namespace { namespace {
...@@ -173,7 +173,7 @@ public: ...@@ -173,7 +173,7 @@ public:
; ;
template < typename _Tp > template < typename _Tp >
struct less { struct less {
bool operator()( _Tp , _Tp ) {} bool operator()( _Tp , _Tp ) {return false;}
}; };
} }
typedef int _Atomic_word; typedef int _Atomic_word;
...@@ -225,6 +225,7 @@ namespace std { ...@@ -225,6 +225,7 @@ namespace std {
(__gnu_cxx::__numeric_traits< int >::__min) (__gnu_cxx::__numeric_traits< int >::__min)
; ;
return 0;
} }
}; };
} }
...@@ -252,10 +253,10 @@ namespace std { ...@@ -252,10 +253,10 @@ namespace std {
void operator0() {} void operator0() {}
}; };
template <> struct __hash_base< size_t, char16_t > { template <> struct __hash_base< size_t, char16_t > {
size_t operator0() {} size_t operator0() {return 0;}
}; };
template <> struct __hash_base< size_t, char32_t > { template <> struct __hash_base< size_t, char32_t > {
size_t operator0() {} size_t operator0() {return 0;}
}; };
template <> struct hash< short > { template <> struct hash< short > {
void operator0() {} void operator0() {}
...@@ -292,11 +293,11 @@ namespace std { ...@@ -292,11 +293,11 @@ namespace std {
; ;
_Bit_type _M_mask; _Bit_type _M_mask;
_Bit_reference () {} _Bit_reference () {}
operator bool() {} operator bool() {return false;}
_Bit_reference (bool ) {} _Bit_reference (bool ) {}
_Bit_reference operator=(_Bit_reference ) {} _Bit_reference operator=(_Bit_reference ) {return *this;}
bool operator==(_Bit_reference ) {} bool operator==(_Bit_reference ) {return false;}
bool operator<(_Bit_reference ) {} bool operator<(_Bit_reference ) {return false;}
void flip() {} void flip() {}
}; };
void swap() {} void swap() {}
...@@ -311,21 +312,21 @@ namespace std { ...@@ -311,21 +312,21 @@ namespace std {
void _M_bump_up() {} void _M_bump_up() {}
void _M_bump_down() {} void _M_bump_down() {}
void _M_incr() {} void _M_incr() {}
bool operator==(_Bit_iterator_base ) {} bool operator==(_Bit_iterator_base ) {return false;}
bool operator<(_Bit_iterator_base ) {} bool operator<(_Bit_iterator_base ) {return false;}
bool operator!=(_Bit_iterator_base ) {} bool operator!=(_Bit_iterator_base ) {return false;}
bool operator>(_Bit_iterator_base ) {} bool operator>(_Bit_iterator_base ) {return false;}
bool operator<=(_Bit_iterator_base ) {} bool operator<=(_Bit_iterator_base ) {return false;}
bool operator>=(_Bit_iterator_base ) {} bool operator>=(_Bit_iterator_base ) {return false;}
}; };
struct _Bit_iterator : _Bit_iterator_base { struct _Bit_iterator : _Bit_iterator_base {
_Bit_iterator() : _Bit_iterator_base(0, 0) {} _Bit_iterator() : _Bit_iterator_base(0, 0) {}
_Bit_iterator(_Bit_type *__x, int __y) _Bit_iterator(_Bit_type *__x, int __y)
: _Bit_iterator_base(__x, __y) {} : _Bit_iterator_base(__x, __y) {}
iterator _M_const_cast() {} iterator _M_const_cast() {return iterator ();}
iterator operator+() {} iterator operator+() {return iterator ();}
iterator operator-() {} iterator operator-() {return iterator ();}
reference operator[](difference_type ) {} reference operator[](difference_type ) {return 0;}
}; };
void operator+(_Bit_iterator ) {} void operator+(_Bit_iterator ) {}
struct _Bit_const_iterator : _Bit_iterator_base { struct _Bit_const_iterator : _Bit_iterator_base {
...@@ -349,9 +350,10 @@ namespace std { ...@@ -349,9 +350,10 @@ namespace std {
class error_category { class error_category {
bool operator<(error_category __other) { bool operator<(error_category __other) {
less< error_category * >()(this, &__other); less< error_category * >()(this, &__other);
return false;
} }
bool operator==(error_category ) {} bool operator==(error_category ) {return false;}
bool operator!=(error_category ) {} bool operator!=(error_category ) {return false;}
}; };
} }
struct error_code { struct error_code {
...@@ -359,42 +361,42 @@ namespace std { ...@@ -359,42 +361,42 @@ namespace std {
error_code(error_category ) : _M_cat() {} error_code(error_category ) : _M_cat() {}
void assign() {} void assign() {}
void clear() {} void clear() {}
int value() {} int value() {return 0;}
error_category category() {} error_category category() {return error_category ();}
string message() {} string message() {return string();}
error_category _M_cat; error_category _M_cat;
}; };
inline error_code make_error_code() noexcept {} inline error_code make_error_code() noexcept {return error_code ();}
inline bool operator<(const error_code , inline bool operator<(const error_code ,
const error_code ) noexcept {} const error_code ) noexcept {return false;}
struct error_condition { struct error_condition {
error_condition() {} error_condition() {}
error_condition(const error_category ) {} error_condition(const error_category ) {}
void assign() noexcept {} void assign() noexcept {}
void clear() noexcept {} void clear() noexcept {}
int value() {} int value() {return 0;}
const error_category &category() {} const error_category category() {return error_category ();}
string message_M_cat; string message_M_cat;
}; };
inline error_condition make_error_condition() noexcept {} inline error_condition make_error_condition() noexcept {return error_condition ();}
inline bool operator<(const error_condition , inline bool operator<(const error_condition ,
const error_condition ) noexcept {} const error_condition ) noexcept {return false;}
inline bool operator==(const error_code , inline bool operator==(const error_code ,
const error_code ) noexcept {} const error_code ) noexcept {return false;}
inline bool operator==(const error_code , inline bool operator==(const error_code ,
const error_condition ) noexcept {} const error_condition ) noexcept {return false;}
inline bool operator==(const error_condition , inline bool operator==(const error_condition ,
const error_code ) noexcept {} const error_code ) noexcept {return false;}
inline bool operator==(const error_condition , inline bool operator==(const error_condition ,
const error_condition ) noexcept {} const error_condition ) noexcept {return false;}
inline bool operator!=(const error_code , inline bool operator!=(const error_code ,
const error_code ) noexcept {} const error_code ) noexcept {return false;}
inline bool operator!=(const error_code , inline bool operator!=(const error_code ,
const error_condition ) noexcept {} const error_condition ) noexcept {return false;}
inline bool operator!=(const error_condition , inline bool operator!=(const error_condition ,
const error_code ) noexcept {} const error_code ) noexcept {return false;}
inline bool operator!=(const error_condition , inline bool operator!=(const error_condition ,
const error_condition ) noexcept {} const error_condition ) noexcept {return false;}
class system_error : public runtime_error { class system_error : public runtime_error {
error_code _M_code; error_code _M_code;
...@@ -410,47 +412,47 @@ namespace std { ...@@ -410,47 +412,47 @@ namespace std {
: runtime_error(error_code().message()) {} : runtime_error(error_code().message()) {}
system_error(const string &__what) system_error(const string &__what)
: runtime_error(error_code().message()) {} : runtime_error(error_code().message()) {}
const error_code &code() {} const error_code code() {return error_code ();}
void operator0() {} void operator0() {}
}; };
enum _Ios_Fmtflags {}; enum _Ios_Fmtflags {};
_Ios_Fmtflags operator&(_Ios_Fmtflags __a__b) {} _Ios_Fmtflags operator&(_Ios_Fmtflags &__a) {return __a;}
_Ios_Fmtflags operator|(_Ios_Fmtflags __a, _Ios_Fmtflags operator|(_Ios_Fmtflags &__a,
_Ios_Fmtflags __b) {} _Ios_Fmtflags __b) {return __a;}
_Ios_Fmtflags operator^(_Ios_Fmtflags __a, _Ios_Fmtflags operator^(_Ios_Fmtflags &__a,
_Ios_Fmtflags __b) {} _Ios_Fmtflags __b) {return __a;}
_Ios_Fmtflags operator~(_Ios_Fmtflags __a) {} _Ios_Fmtflags operator~(_Ios_Fmtflags &__a) {return __a;}
_Ios_Fmtflags &operator|=(_Ios_Fmtflags , _Ios_Fmtflags &operator|=(_Ios_Fmtflags &__a,
_Ios_Fmtflags __b) {} _Ios_Fmtflags __b) {return __a;}
_Ios_Fmtflags &operator&=(_Ios_Fmtflags , _Ios_Fmtflags &operator&=(_Ios_Fmtflags &__a,
_Ios_Fmtflags __b) {} _Ios_Fmtflags __b) {return __a;}
_Ios_Fmtflags &operator^=(_Ios_Fmtflags , _Ios_Fmtflags &operator^=(_Ios_Fmtflags &__a,
_Ios_Fmtflags __b) {} _Ios_Fmtflags __b) {return __a;}
enum _Ios_Openmode { enum _Ios_Openmode {
_S_ios_openmode_max }; _S_ios_openmode_max };
_Ios_Openmode operator&(_Ios_Openmode __a__b) {} _Ios_Openmode operator&(_Ios_Openmode &__a__b) {return __a__b;}
_Ios_Openmode operator|(_Ios_Openmode __a, _Ios_Openmode operator|(_Ios_Openmode &__a,
_Ios_Openmode __b) {} _Ios_Openmode __b) {return __a;}
_Ios_Openmode operator^(_Ios_Openmode __a, _Ios_Openmode operator^(_Ios_Openmode &__a,
_Ios_Openmode __b) {} _Ios_Openmode __b) {return __a;}
_Ios_Openmode operator~(_Ios_Openmode __a) {} _Ios_Openmode operator~(_Ios_Openmode &__a) {return __a;}
_Ios_Openmode &operator|=(_Ios_Openmode , _Ios_Openmode &operator|=(_Ios_Openmode &__a,
_Ios_Openmode __b) {} _Ios_Openmode __b) {return __a;}
_Ios_Openmode &operator&=(_Ios_Openmode , _Ios_Openmode &operator&=(_Ios_Openmode &__a,
_Ios_Openmode __b) {} _Ios_Openmode __b) {return __a;}
_Ios_Openmode &operator^=(_Ios_Openmode , _Ios_Openmode &operator^=(_Ios_Openmode &__a,
_Ios_Openmode __b) {} _Ios_Openmode __b) {return __a;}
enum _Ios_Iostate { enum _Ios_Iostate {
_S_ios_iostate_max }; _S_ios_iostate_max };
_Ios_Iostate operator&(_Ios_Iostate __a__b) {} _Ios_Iostate operator&(_Ios_Iostate &__a__b) {return __a__b;}
_Ios_Iostate operator|(_Ios_Iostate __a, _Ios_Iostate __b) {} _Ios_Iostate operator|(_Ios_Iostate &__a, _Ios_Iostate __b) {return __a;}
_Ios_Iostate operator^(_Ios_Iostate __a, _Ios_Iostate __b) {} _Ios_Iostate operator^(_Ios_Iostate &__a, _Ios_Iostate __b) {return __a;}
_Ios_Iostate operator~(_Ios_Iostate __a) {} _Ios_Iostate operator~(_Ios_Iostate &__a) {return __a;}
_Ios_Iostate &operator|=(_Ios_Iostate , _Ios_Iostate __b) {} _Ios_Iostate &operator|=(_Ios_Iostate &__a, _Ios_Iostate __b) {return __a;}
_Ios_Iostate &operator&=(_Ios_Iostate , _Ios_Iostate __b) {} _Ios_Iostate &operator&=(_Ios_Iostate &__a, _Ios_Iostate __b) {return __a;}
_Ios_Iostate &operator^=(_Ios_Iostate , _Ios_Iostate __b) {} _Ios_Iostate &operator^=(_Ios_Iostate &__a, _Ios_Iostate __b) {return __a;}
enum class io_errc; enum class io_errc;
inline error_code make_error_code(io_errc __e) noexcept {} inline error_code make_error_code(io_errc __e) noexcept {return error_code();}
inline error_condition make_error_condition_wrap_class_string; inline error_condition make_error_condition_wrap_class_string;
static luaL_Reg swig_ClientProfile_methods; static luaL_Reg swig_ClientProfile_methods;
static luaL_Reg swig_ClientProfile_meta; static luaL_Reg swig_ClientProfile_meta;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment