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: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2005 10:33:50 -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 #8 from schlie at comcast dot net 2005-10-26 10:33 -------
Subject: Re: BLK ptr's losing original ptr's
static-constant readonly attribute.
> ------- 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.
- one would think that abi issues such as these should be addressed
within the target's .md file/port; not within the core compiler itself.
- nor should: char f(){ return 1; } ever need to cast 1 to an int, as char
is a perfectly legitimate integer size.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20937