This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14803] [3.4/3.5 regression] Spurious warnings on conversion of pointers to member functions
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Apr 2004 02:04:47 -0000
- Subject: [Bug c++/14803] [3.4/3.5 regression] Spurious warnings on conversion of pointers to member functions
- References: <20040331234444.14803.jbuck@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-04-01 02:04 -------
For some reason the expression has an overflow:
<integer_cst 0x401360a0 type <integer_type 0x400505e8 int> constant static overflow -4>
At typeck.c:5497 (in build_ptrmemfunc, at the assert)
n is <nop_expr 0x417dc5c0
type <integer_type 0x417108b8 int SI
size <integer_cst 0x4170e360 constant invariant 32>
unit size <integer_cst 0x4170e400 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x4170e3c0 -2147483648> max
<integer_cst 0x4170e3e0 2147483647>
pointer_to_this <pointer_type 0x4171d7c0>>
constant invariant
arg 0 <integer_cst 0x41790780 type <integer_type 0x4171d174> constant invariant -4>>
and delta is:
<nop_expr 0x417dc5e0
type <integer_type 0x417108b8 int SI
size <integer_cst 0x4170e360 constant invariant 32>
unit size <integer_cst 0x4170e400 constant invariant 4>
align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0x4170e3c0 -2147483648> max
<integer_cst 0x4170e3e0 2147483647>
pointer_to_this <pointer_type 0x4171d7c0>>
constant invariant
arg 0 <integer_cst 0x4170ea80 type <integer_type 0x4171d000 long unsigned int> constant
invariant 0>>
So when they are added together it sets the overflow bit for some reason (maybe setting the overflow
bit to 0 will work).
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.4.0 regression] Spurious |[3.4/3.5 regression]
|warnings on conversion of |Spurious warnings on
|pointers to member functions|conversion of pointers to
| |member functions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14803