• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

GNU Binutils with patches for OS216


Commit MetaInfo

Revision3c8ea5be24ecc76600b6cea36240449a84c0fc22 (tree)
Zeit2020-07-03 23:01:22
AutorPedro Alves <palves@redh...>
CommiterPedro Alves

Log Message

Fix gdb.base/structs2.exp with Clang

gdb.base/structs2.exp fails to run with Clang, because of:

gdb compile failed, /home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/structs2.c:16:14: warning:
implicit conversion from 'int' to 'signed char' changes value from 130 to
-126 [-Wconstant-conversion]
param_reg (130, 120, 33000, 32000);
~
/home/pedro/gdb/mygit/src/gdb/testsuite/gdb.base/structs2.c:16:24: warning:
implicit conversion from 'int' to 'short' changes value from 33000 to
-32536 [-Wconstant-conversion]
param_reg (130, 120, 33000, 32000);
~
2 warnings generated.

=== gdb Summary ===

# of untested testcases 1

Fix it by passing actual negative numbers.

gdb/testsuite/ChangeLog:

* gdb.base/structs2.c (main): Adjust second parem_reg call to
explicitly write negative numbers.
* gdb.base/structs2.exp: Adjust expected output.

Ändern Zusammenfassung

Diff

--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
11 2020-07-03 Pedro Alves <palves@redhat.com>
22
3+ * gdb.base/structs2.c (main): Adjust second parem_reg call to
4+ explicitly write negative numbers.
5+ * gdb.base/structs2.exp: Adjust expected output.
6+
7+2020-07-03 Pedro Alves <palves@redhat.com>
8+
39 * gdb.base/charset.c (init_string): Change all char parameters to
410 unsigned char parameters.
511
--- a/gdb/testsuite/gdb.base/structs2.c
+++ b/gdb/testsuite/gdb.base/structs2.c
@@ -13,7 +13,7 @@ main ()
1313
1414 bkpt = 0;
1515 param_reg (120, 130, 32000, 33000);
16- param_reg (130, 120, 33000, 32000);
16+ param_reg (-120, 130, -32000, 33000);
1717
1818 return 0;
1919 }
--- a/gdb/testsuite/gdb.base/structs2.exp
+++ b/gdb/testsuite/gdb.base/structs2.exp
@@ -49,5 +49,5 @@ if [test_compiler_info gcc-3-*] {
4949 setup_xfail hppa*-* gcc/15860
5050 }
5151 gdb_test "continue" \
52- ".*pr_char=-126.*pr_uchar=120.*pr_short=-32536.*pr_ushort=32000.*bkpt = 1.*" \
52+ ".*pr_char=-120.*pr_uchar=130.*pr_short=-32000.*pr_ushort=33000.*bkpt = 1.*" \
5353 "structs2 continue2"