Re: Initialization

Discussion in 'C Programming' started by Eric Sosman, Jan 24, 2013.

  1. Eric Sosman

    Eric Sosman Guest

    On 1/23/2013 9:03 PM, Russell Shaw wrote:
    > Hi,
    > In gcc-4.7 C99, this gets accepted in a block scope:
    >
    > static int a = 1;
    >
    >
    > ISO/IEC 9899:201x 6.7.8p5 says:
    >
    > If the declaration of an identifier has block scope, and the identifier
    > has external or internal linkage, the declaration shall have no
    > initializer for the identifier.


    The identifier `a' has no linkage (6.2.2p6).

    --
    Eric Sosman
    d
    Eric Sosman, Jan 24, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JKop
    Replies:
    10
    Views:
    910
  2. Matthias Kaeppler
    Replies:
    2
    Views:
    413
    Victor Bazarov
    Jul 18, 2005
  3. Replies:
    6
    Views:
    443
    Ron Natalie
    Dec 11, 2005
  4. toton
    Replies:
    5
    Views:
    912
    Victor Bazarov
    Sep 28, 2006
  5. Jess
    Replies:
    23
    Views:
    905
Loading...

Share This Page