This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]