GCC problem (Was: Re: [bugs] Problem compiling the kernel)

Joseph S. Myers jsm28@cam.ac.uk
Mon Dec 10 08:09:00 GMT 2001


On Mon, 10 Dec 2001, Jakub Jelinek wrote:

> How big burden would to be keep supporting this in -std=gnu89 and -std=gnu99
> modes? I don't think Linux kernel is the only user of this extension.

You're the expert on initializers in GCC, not me; you'd need to handle a
COMPOUND_LITERAL_EXPR specially for objects of static storage duration in
the appropriate place, and look at the DECL_INITIAL of the
COMPOUND_LITERAL_EXPR_DECL.  (Plus add a testcase and docs.)

The extension looked like a completely useless one, since (absent macros,
which I hadn't considered) why would anyone write the additional "(type)"
of the compound literal when they meant just the brace-enclosed list?

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list