On Fri, 2005-04-22 at 15:56, Paul Schlie wrote:
> - Why are string literal character arrays not constructed and expanded as
>   character array literals are?

They are constructed and expanded differently, because, obviously, they
are different things.  I don't understand the point of this question.

There are obvious syntax differences.  There are obvious semantic
differences.  So they have to be different at least until we reach the
optimizers.  And perhaps longer.

We could perhaps do some conversion between them, but since not all
array initializers can be strings, and because converting strings to
array initializers probably won't work in all cases, we still need to
have two separate code paths.  And since we have to have two separate
code paths, anyways, there doesn't seem to be much point in trying to do
any conversion.

There may also be historical reasons, which I see no point to trying to
look up.

If you really think there is an issue here, you are welcome to
investigate it yourself.  I am not going to do it for you, at least not
for free.

Also, this question bears no relationship to the original thread.  These
off-topic follow ups can be annoying.  You should start new threads for
new questions instead of trying to hijack an existing thread.

>   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 true, that sounds like a bug.  This is the only interesting issue
here from my point of view.  You might consider filing a bug report into
bugzilla for this.  Or contributing a patch.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


Reply via email to