diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-01-30 22:38:56 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-01-30 22:38:56 +0000 |
commit | f038d31b6c0de159fcc0e1d284ded872cd5c5fbf (patch) | |
tree | f801f66eebf5b94bdfb03949733e9033aada62f8 | |
parent | 69824b4e99fc536995e0183ecd03ce99d128a394 (diff) | |
download | gdb-f038d31b6c0de159fcc0e1d284ded872cd5c5fbf.zip gdb-f038d31b6c0de159fcc0e1d284ded872cd5c5fbf.tar.gz gdb-f038d31b6c0de159fcc0e1d284ded872cd5c5fbf.tar.bz2 |
2002-01-30 Daniel Jacobowitz <drow@mvista.com>
From Neil Booth <neil@daikokuya.demon.co.uk>:
* gdb.base/bitfields.c: Correct assignments to bitfields to avoid
warnings.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/bitfields.c | 26 |
2 files changed, 19 insertions, 13 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c4c0fd9..dd64a30 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-01-30 Daniel Jacobowitz <drow@mvista.com> + + From Neil Booth <neil@daikokuya.demon.co.uk>: + * gdb.base/bitfields.c: Correct assignments to bitfields to avoid + warnings. + 2002-01-21 Fred Fish <fnf@redhat.com> * gdb.base/restore.exp (restore_tests): Fix obvious typo, callee diff --git a/gdb/testsuite/gdb.base/bitfields.c b/gdb/testsuite/gdb.base/bitfields.c index 3e6b2e6..bd411f7 100644 --- a/gdb/testsuite/gdb.base/bitfields.c +++ b/gdb/testsuite/gdb.base/bitfields.c @@ -80,7 +80,7 @@ int main () break1 (); flags.uc = 0; - flags.s1 = 1; + flags.s1 = -1; break1 (); flags.s1 = 0; @@ -131,10 +131,10 @@ int main () flags.u3 = 0; flags.u9 = 0; - flags.s1 = 0x1; - flags.s2 = 0x3; - flags.s3 = 0x7; - flags.s9 = 0x1FF; + flags.s1 = -1; + flags.s2 = -1; + flags.s3 = -1; + flags.s9 = -1; flags.sc = 0xFF; break2 (); flags.s1 = 0; @@ -169,20 +169,20 @@ int main () break4 (); /* Maximally negative values */ - flags.s1 = 0x1; - flags.s2 = 0x2; - flags.s3 = 0x4; - flags.s9 = 0x100; + flags.s1 = -0x1; + flags.s2 = -0x2; + flags.s3 = -0x4; + flags.s9 = -0x100; /* Extract bitfield value so that bitfield.exp can check if the target understands signed bitfields. */ i = flags.s9; break4 (); /* -1 */ - flags.s1 = 0x1; - flags.s2 = 0x3; - flags.s3 = 0x7; - flags.s9 = 0x1FF; + flags.s1 = -1; + flags.s2 = -1; + flags.s3 = -1; + flags.s9 = -1; break4 (); flags.s1 = 0; |