String content not emitted
\ Boris Boesler (16 Apr 2008)
. \ Andrew Haley (16 Apr 2008)

6 msgGomp cell,...
1 msgDisjoint address register problem during GCC port
2 msgOut of ssa form only for some basic block
11 msgA live analysis problem on gcc4.2.3
2 msgStructured Exception Handling in gcc
5 msgBootstrap failure on i686-apple-darwin9
2 msggfortran+libcpp: linking objects from c-compiler
3 msg-pthread switch and binary compatibitity
1 msgImplementation of string-literal as template pa...
3 msgWhere is restrict keyword used in dependence an...
2 msg[tuples] creating singleton sequences
1 msgWarning during GCC bootstrap on i686-pc-mingw32
2 msgDU-chains Vs UD-chains
6 msgBootstrap failure on native mingw32
1 msgbootstrap failure in gcc4.3.1 on hppa2.0w-hp-hp...
1 msgtemplate parameter does not hide class name
2 msgA question regarding define_split pattern
19 msgCan't build correctly working crosscompiler wit...
8 msg[ARM] Lack of __aeabi_fsqrt / __aeabi_dsqrt (sq...
Subject:Re: String content not emitted
Group:Gcc
From:Andrew Haley
Date:16 Apr 2008


Boris Boesler wrote:

> The following "program" can be compiled without problems.
>
> extern void something(char *s);
> char msg[] = "123456";
> int main(int argc, char **argv)
> {
> something(msg);
> return 0;
> }
>
> But I can't compile it correctly with my backend. The content of msg is
> not emitted; there is only the label. It will be emitted when it the
> size is at least 8 characters.
>
> I assume the problem is that I set BITS_PER_UNIT to 1 and that there is
> some size computation that depends on BITS_PER_UNIT >= 8. Is that
> possible? How can I fix that?

C requires BITS_PER_UNIT to be at least 8. char must always be large
enough to hold a character, and sizeof (char) == 1.

Andrew.


© 2004-2008 readlist.com