mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-22 19:11:18 +08:00
re PR c++/19190 (warning "value computed is not used" emitted too often)
PR c++/19190 * cvt.c (convert_to_void): Do not use STRIP_NOPs. PR c++/19190 * g++.dg/warn/Wunused-10.C: New test. From-SVN: r92721
This commit is contained in:
parent
d98fd13429
commit
d9fa123367
gcc
@ -1,3 +1,8 @@
|
||||
2004-12-29 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/19190
|
||||
* cvt.c (convert_to_void): Do not use STRIP_NOPs.
|
||||
|
||||
2004-12-28 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR inline-asm/15740
|
||||
|
@ -929,8 +929,11 @@ convert_to_void (tree expr, const char *implicit)
|
||||
turned into a call to "__builtin_memcpy", with a
|
||||
conversion of the return value to an appropriate
|
||||
type.) So, to avoid false positives, we strip
|
||||
conversions. */
|
||||
STRIP_NOPS (e);
|
||||
conversions. Do not use STRIP_NOPs because it will
|
||||
not strip conversions to "void", as that is not a
|
||||
mode-preserving conversion. */
|
||||
while (TREE_CODE (e) == NOP_EXPR)
|
||||
e = TREE_OPERAND (e, 0);
|
||||
|
||||
code = TREE_CODE (e);
|
||||
class = TREE_CODE_CLASS (code);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-12-29 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/19190
|
||||
* g++.dg/warn/Wunused-10.C: New test.
|
||||
|
||||
2004-12-28 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* objc.dg/stabs-1.m: Disable for alpha.
|
||||
|
8
gcc/testsuite/g++.dg/warn/Wunused-10.C
Normal file
8
gcc/testsuite/g++.dg/warn/Wunused-10.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/19190
|
||||
// { dg-options "-Wunused" }
|
||||
|
||||
struct breakme
|
||||
{
|
||||
void setAction( unsigned char a ) { act = a; }
|
||||
unsigned int act:8;
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user