This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36300] Incorrect type used for inlined expression
- From: "acarmeli at mathworks dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 May 2008 12:50:50 -0000
- Subject: [Bug middle-end/36300] Incorrect type used for inlined expression
- References: <bug-36300-16214@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from acarmeli at mathworks dot com 2008-05-27 12:50 -------
Richard,
I truly appreciate your effort on this bug.
Can you please elaborate on your plan? Will this be fixed for -fwrapv only, or
also for -fwrapv-free compilations?
I understand that downcasting an out-of-range value to a signed integer is not
defined in the standard. However, many compilers offer an "expected" modulo-2^n
behavior. This behavior helps avoid writing extra cumbersome "safe downcast"
code. Having GCC offer it for non -fwrapv compilations is an important
interoperability and readability feature.
Thank you for looking into it.
Alex.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36300