diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-23 19:04:29 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-23 19:04:29 +0000 |
commit | 9a9db3c180018307d99515a86cd7f8f4550b96e5 (patch) | |
tree | 98eacc6f827b22b6ab595fbe3aaa8fffd51e38b5 /libdecnumber | |
parent | 9ea3e92442af479a3e29be3c787bae1fc274bc03 (diff) | |
download | linaro-gcc-9a9db3c180018307d99515a86cd7f8f4550b96e5.tar.gz linaro-gcc-9a9db3c180018307d99515a86cd7f8f4550b96e5.tar.bz2 linaro-gcc-9a9db3c180018307d99515a86cd7f8f4550b96e5.zip |
PR c/59871
c/
* c-typeck.c (build_compound_expr): Warn even for right-hand operand
of a comma expression.
(emit_side_effect_warnings): Likewise.
libdecnumber/
* decNumberLocal.h (UBFROMUS, UBFROMUI): Remove last argument.
testsuite/
* gcc.dg/20020220-2.c: Adjust dg-warning message.
* gcc.dg/pr59871.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libdecnumber')
-rw-r--r-- | libdecnumber/ChangeLog | 5 | ||||
-rw-r--r-- | libdecnumber/decNumberLocal.h | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/libdecnumber/ChangeLog b/libdecnumber/ChangeLog index 36a60033c1b..14df41c99ea 100644 --- a/libdecnumber/ChangeLog +++ b/libdecnumber/ChangeLog @@ -1,3 +1,8 @@ +2014-01-23 Marek Polacek <polacek@redhat.com> + + PR c/59871 + * decNumberLocal.h (UBFROMUS, UBFROMUI): Remove last argument. + 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com> Update copyright years diff --git a/libdecnumber/decNumberLocal.h b/libdecnumber/decNumberLocal.h index 94e7f7f9b1f..4936231f2a2 100644 --- a/libdecnumber/decNumberLocal.h +++ b/libdecnumber/decNumberLocal.h @@ -153,10 +153,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define UBTOUI(b) (memcpy((void *)&uiwork, b, 4), uiwork) /* Store a uInt, etc., into bytes starting at a char* or uByte*. */ - /* Returns i, evaluated, for convenience; has to use uiwork because */ - /* i may be an expression. */ - #define UBFROMUS(b, i) (uswork=(i), memcpy(b, (void *)&uswork, 2), uswork) - #define UBFROMUI(b, i) (uiwork=(i), memcpy(b, (void *)&uiwork, 4), uiwork) + /* Has to use uiwork because i may be an expression. */ + #define UBFROMUS(b, i) (uswork=(i), memcpy(b, (void *)&uswork, 2)) + #define UBFROMUI(b, i) (uiwork=(i), memcpy(b, (void *)&uiwork, 4)) /* X10 and X100 -- multiply integer i by 10 or 100 */ /* [shifts are usually faster than multiply; could be conditional] */ |