* negative repeat count for x examines backwards * fortran: support structs/arrays with dynamically types fields * support MPX bound checking * support for the Rust language * 'catch syscall' now can catch groups of related syscalls * New (sub)commands: - skip {-file,-gfile,-function,-rfunction}: generic skip mechanism - maint {selftest,info line-table} - new-ui: create new user interface for GUI clients * (fast) tracepoints on s390x and ppc64le added to gdbserver * New target Andes NDS32 - Remove patch gdb-aarch64-v81-hwbreakpoints.diff (upstream) - Add patches from Fedora package: gdb-6.7-testsuite-stable-results.patch gdb-add-index-chmod.patch gdb-bison-old.patch gdb-container-rh-pkg.patch gdb-libexec-add-index.patch gdb-linux_perf-bundle.patch gdb-physname-pr11734-test.patch gdb-physname-pr12273-test.patch gdb-rhbz1007614-memleak-infpy_read_memory-test.patch gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch gdb-rhbz1149205-catch-syscall-after-fork-test.patch gdb-rhbz1156192-recursive-dlopen-test.patch gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch gdb-rhbz1350436-type-printers-error.patch gdb-test-ivy-bridge.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=151
80 lines
2.8 KiB
Diff
80 lines
2.8 KiB
Diff
http://sourceware.org/ml/gdb-patches/2016-09/msg00083.html
|
||
Subject: [testsuite patch] Fix C++11 compilation failure for gdb.cp/m-static.exp
|
||
|
||
|
||
--y0ulUmNC+osPPQO6
|
||
Content-Type: text/plain; charset=iso-2022-jp
|
||
Content-Disposition: inline
|
||
|
||
Hi,
|
||
|
||
gcc-6.2.1-1.fc26.x86_64
|
||
|
||
g++ -std=c++03:
|
||
no warnings
|
||
|
||
g++:
|
||
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:0:
|
||
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:34: error: $B!F(Bconstexpr$B!G(B needed for in-class initialization of static data member $B!F(Bconst float gnu_obj_4::somewhere$B!G(B of non-integral type [-fpermissive]
|
||
static const float somewhere = 3.14159;
|
||
^~~~~~~
|
||
|
||
clang++:
|
||
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
|
||
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
|
||
static const float somewhere = 3.14159;
|
||
^ ~~~~~~~
|
||
1 warning generated.
|
||
|
||
clang++ -std=c++11:
|
||
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
|
||
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: error: in-class initializer for static data member of type 'const float' requires 'constexpr' specifier [-Wstatic-float-init]
|
||
static const float somewhere = 3.14159;
|
||
^ ~~~~~~~
|
||
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:3: note: add 'constexpr'
|
||
static const float somewhere = 3.14159;
|
||
^
|
||
constexpr
|
||
1 error generated.
|
||
|
||
OK for check-in?
|
||
|
||
After the fix out of the 4 combinations above only this one remains non-empty:
|
||
|
||
clang++:
|
||
In file included from /home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.cc:79:
|
||
/home/jkratoch/redhat/gdb-clean/gdb/testsuite/gdb.cp/m-static.h:9:22: warning: in-class initializer for static data member of type 'const float' is a GNU extension [-Wgnu-static-float-init]
|
||
static const float somewhere = 3.14159;
|
||
^ ~~~~~~~
|
||
1 warning generated.
|
||
|
||
|
||
Jan
|
||
|
||
--y0ulUmNC+osPPQO6
|
||
Content-Type: text/plain; charset=us-ascii
|
||
Content-Disposition: inline; filename=1
|
||
|
||
gdb/testsuite/ChangeLog
|
||
2016-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||
|
||
* gdb.cp/m-static.h (gnu_obj_4::somewhere): Use constexpr for C++11.
|
||
|
||
diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h
|
||
index bcedfff..2992463 100644
|
||
--- a/gdb/testsuite/gdb.cp/m-static.h
|
||
+++ b/gdb/testsuite/gdb.cp/m-static.h
|
||
@@ -6,6 +6,9 @@ class gnu_obj_4
|
||
static const int elsewhere;
|
||
static const int nowhere;
|
||
static const int everywhere = 317;
|
||
+#if __cplusplus >= 201103L
|
||
+ constexpr
|
||
+#endif
|
||
static const float somewhere = 3.14159;
|
||
|
||
// try to ensure test4 is actually allocated
|
||
|
||
--y0ulUmNC+osPPQO6--
|
||
|