This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- To: aoliva at redhat dot com (Alexandre Oliva)
- Subject: Re: C++ ptrmemfun break if FUNCTION_BOUNDARY < 2 * BITS_PER_UNIT
- From: Joern Rennecke <amylaar at cambridge dot redhat dot com>
- Date: Mon, 9 Apr 2001 20:27:55 +0100 (BST)
- Cc: wilson at cygnus dot com (Jim Wilson), gcc at gcc dot gnu dot org,gcc-patches at gcc dot gnu dot org, gdb at sources dot redhat dot com
Is it safe to use arithmetic SHIFTs instead of letting the compiler
> choose them instead of DIVs and MULTs? For some reason, on
> mn10300-elf, the div makes it to the generated code, which we
> certainly don't want.
A signed division is not a portable way to extract a bit. And for
negative values, it just doesn't work.
Why don't you use an unsigned division or a logical shift?