/usr/src/gcc-4.9/debian/patches/pr56158.diff is in gcc-4.9-source 4.9.3-13ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | # DP: Fix PR libstdc++/56158, taken from the trunk
libstdc++-v3/
2015-11-12 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/56158
* include/bits/ios_base.h (_Ios_Fmtflags, _Ios_Openmode, _Ios_Iostate):
Define enumerators to ensure all values of type int are valid values
of the enumeration type.
* testsuite/27_io/ios_base/types/fmtflags/case_label.cc: Add new cases.
* testsuite/27_io/ios_base/types/iostate/case_label.cc: Likewise.
* testsuite/27_io/ios_base/types/openmode/case_label.cc: Likewise.
Index: b/src/libstdc++-v3/include/bits/ios_base.h
===================================================================
--- a/src/libstdc++-v3/include/bits/ios_base.h
+++ b/src/libstdc++-v3/include/bits/ios_base.h
@@ -68,7 +68,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_adjustfield = _S_left | _S_right | _S_internal,
_S_basefield = _S_dec | _S_oct | _S_hex,
_S_floatfield = _S_scientific | _S_fixed,
- _S_ios_fmtflags_end = 1L << 16
+ _S_ios_fmtflags_end = 1L << 16,
+ _S_ios_fmtflags_max = __INT_MAX__,
+ _S_ios_fmtflags_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Fmtflags
@@ -108,7 +110,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_in = 1L << 3,
_S_out = 1L << 4,
_S_trunc = 1L << 5,
- _S_ios_openmode_end = 1L << 16
+ _S_ios_openmode_end = 1L << 16,
+ _S_ios_openmode_max = __INT_MAX__,
+ _S_ios_openmode_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Openmode
@@ -146,7 +150,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_S_badbit = 1L << 0,
_S_eofbit = 1L << 1,
_S_failbit = 1L << 2,
- _S_ios_iostate_end = 1L << 16
+ _S_ios_iostate_end = 1L << 16,
+ _S_ios_iostate_max = __INT_MAX__,
+ _S_ios_iostate_min = ~__INT_MAX__
};
inline _GLIBCXX_CONSTEXPR _Ios_Iostate
Index: b/src/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
+++ b/src/libstdc++-v3/testsuite/27_io/ios_base/types/fmtflags/case_label.cc
@@ -70,5 +70,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_fmtflags_end:
break;
+ case std::_S_ios_fmtflags_min:
+ break;
+ case std::_S_ios_fmtflags_max:
+ break;
}
}
Index: b/src/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
+++ b/src/libstdc++-v3/testsuite/27_io/ios_base/types/openmode/case_label.cc
@@ -46,5 +46,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_openmode_end:
break;
+ case std::_S_ios_openmode_min:
+ break;
+ case std::_S_ios_openmode_max:
+ break;
}
}
Index: b/src/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
===================================================================
--- a/src/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
+++ b/src/libstdc++-v3/testsuite/27_io/ios_base/types/iostate/case_label.cc
@@ -42,5 +42,9 @@ case_labels(bitmask_type b)
break;
case std::_S_ios_iostate_end:
break;
+ case std::_S_ios_iostate_min:
+ break;
+ case std::_S_ios_iostate_max:
+ break;
}
}
|