public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* const static initializers versionitis
@ 2000-08-18  8:43 Gianni Mariani
  2000-08-22  8:12 ` Gianni Mariani
  0 siblings, 1 reply; 10+ messages in thread
From: Gianni Mariani @ 2000-08-18  8:43 UTC (permalink / raw)
  To: gcc

The code below compiles fine with egcs-2.91.66 but fails with 2.95.2 and

2.95.3 .   Am I missing somthing ?  Any way of getting the egcs-2.91.66
behaviour in 2.95.3 ?

g++2.95.2 -c yy.cpp
yy.cpp:7: uninitialized const `bar'
yy.cpp:9: uninitialized const `tar'
--------- yy.cpp -----------
struct foo {
        const struct foo * y;
        char    who[ 10 ];
};

const static struct foo bar[];

const static struct foo tar[];

const static struct foo bar[] = {
        tar, "bar"
};

const static struct foo tar[] = {
        bar, "tar"
};

const char * zefuc()
{
        return tar->y->who;
}



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-08-23 10:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-18  8:43 const static initializers versionitis Gianni Mariani
2000-08-22  8:12 ` Gianni Mariani
2000-08-22  8:29   ` Alexandre Oliva
2000-08-22  9:04     ` Gianni Mariani
2000-08-22  9:27       ` Alexandre Oliva
2000-08-22 10:59         ` Gianni Mariani
2000-08-23  2:59           ` Alexandre Oliva
2000-08-23  8:33             ` Gianni Mariani
2000-08-23  9:39               ` Alexandre Oliva
2000-08-23 10:12                 ` Gianni Mariani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).