This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20937] BLK ptr's losing original ptr's static-constant readonly attribute.
- 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: 25 Oct 2005 19:22:03 -0000
- Subject: [Bug middle-end/20937] BLK ptr's losing original ptr's static-constant readonly attribute.
- References: <bug-20937-9497@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pinskia at gcc dot gnu dot org 2005-10-25 19:22 -------
(In reply to comment #6)
> - For some reason, GCC is casting "char" to "int" prior to returning their value as a "char", which
> although works, is a fairly gross mis-optimization? (which should also likely be considred a bug).
That is an ABI issue. Also it is most likely not able to change as some people
still use K&R C where
f()
{
return 1;
}
Is still valid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20937