This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: different address spaces (was Re: internal compiler error atdwarf2out.c:8362)
- From: Paul Schlie <schlie at comcast dot net>
- To: James E Wilson <wilson at specifixinc dot com>
- Cc: Martin Koegler <mkoegler at auto dot tuwien dot ac dot at>,<gcc at gcc dot gnu dot org>
- Date: Fri, 22 Apr 2005 18:56:31 -0400
- Subject: Re: different address spaces (was Re: internal compiler error atdwarf2out.c:8362)
> From: James E Wilson <wilson@specifixinc.com>
>> On Fri, 2005-04-22 at 04:58, Paul Schlie wrote:
>> Thanks. After going through the code, it's even further not clear why
>> STRING_CST string literal data references treated differently than
>> static const char array literal data references to begin with?
>> Why is this necessary?
>
> Why is what necessary? You haven't actually said anything concrete that
> I can answer.
Sorry. More specifically:
- Why are string literal character arrays not constructed and expanded as
character array literals are? (as although similar, there are distinct
sets of code expanding references to each of them; which seems both
unnecessary, and error prone (as evidenced by string literal memory
references not being properly identified as READONLY, although their
equivalent array representations are treated properly for example?)
- If the only difference which exists between them is how their values
are "pretty-printed" as strings, vs. array values; then it would seem
that although they may be labeled differently, but utilize be constructed
and expanded equivalently? If this is not true, why must they be distinct?
- I.e.
char x[3] = "abc";
seems as if it should be literally equivalent in all respects to:
char y[3] = {'a','b','c'};
but are not constructed/expanded as being equivalent?