bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c/7946: -std=gnu99 and casted empty srtuct initializers


From: jsm28
Subject: Re: c/7946: -std=gnu99 and casted empty srtuct initializers
Date: 17 Sep 2002 15:24:53 -0000

Synopsis: -std=gnu99 and casted empty srtuct initializers

State-Changed-From-To: open->closed
State-Changed-By: jsm28
State-Changed-When: Tue Sep 17 08:24:50 2002
State-Changed-Why:
    This is deliberate.  C99 compound literals are not
    constant expressions but unnamed variables intitialized
    in a given way.  The code you give is equivalent to
    
    foo_t compound_literal = { };
    foo_t baz = compound_literal;
    
    which of course fails.  As an allowance for existing
    code written for old GNU compound literals rather than
    C99 compound literals (the Linux kernel), this case
    is permitted in gnu89 mode but not gnu99 mode.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7946




reply via email to

[Prev in Thread] Current Thread [Next in Thread]