[cfe-dev] Compound Literal semantic analysis...

Eli Friedman eli.friedman at gmail.com
Fri Jan 11 13:00:11 PST 2008


On Jan 11, 2008 12:34 PM, Steve Naroff <snaroff at apple.com> wrote:
> In any event, now I understand why EDG/NEILCC allow my original
> example (but not the revised example).

 I'm not sure I'm following... are EDG/NEILCC assuming that compound
literals in initializers for static local variables have static
storage duration?  It doesn't appear to be a legal extension per the
spec, because the spec explicitly states that because they are within
a function body, such compound literals have automatic storage
duration.  clang could do the same thing as EDG/NEILCC's as an
extension, since it doesn't break any compliant C99 programs, but it
doesn't seem like an especially useful extension...

-Eli



More information about the cfe-dev mailing list