operator >> on signed in c89

Discussion in 'C Programming' started by Simon Aittamaa, Oct 12, 2005.

  1. The value of E1 >> E2 when E1 has a signed type and is negative is
    implementation-defined in c99 (6.5.7), is that the case for c89 as well?

    I'm guessing it is but I would like to be sure. Does anyone have a good
    web-resource of the c89 standard?

    - Simon Aittamaa
    Simon Aittamaa, Oct 12, 2005
    #1
    1. Advertising

  2. Simon Aittamaa

    Eric Sosman Guest

    Simon Aittamaa wrote On 10/12/05 14:19,:
    > The value of E1 >> E2 when E1 has a signed type and is negative is
    > implementation-defined in c99 (6.5.7), is that the case for c89 as well?


    ANSI Classic 3.3.7 (probably a different section number
    in ISO's version):

    The result of E1 >> E2 is [...]. If E1 has a signed
    type and a negative value, the resulting value is
    implementation-defined.

    --
    Eric Sosman, Oct 12, 2005
    #2
    1. Advertising

  3. Eric Sosman wrote:
    >
    > Simon Aittamaa wrote On 10/12/05 14:19,:
    >
    >>The value of E1 >> E2 when E1 has a signed type and is negative is
    >>implementation-defined in c99 (6.5.7), is that the case for c89 as well?

    >
    >
    > ANSI Classic 3.3.7 (probably a different section number
    > in ISO's version):
    >
    > The result of E1 >> E2 is [...]. If E1 has a signed
    > type and a negative value, the resulting value is
    > implementation-defined.
    >


    Thanks :)

    - Simon Aittamaa
    Simon Aittamaa, Oct 12, 2005
    #3
    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. Replies:
    13
    Views:
    6,369
    Dave Thompson
    Dec 20, 2004
  2. j

    long long extended type in c89?

    j, Aug 23, 2003, in forum: C Programming
    Replies:
    5
    Views:
    657
    Peter Shaggy Haywood
    Aug 26, 2003
  3. G Patel
    Replies:
    1
    Views:
    535
  4. kyrpa83
    Replies:
    1
    Views:
    615
    kyrpa83
    Oct 17, 2007
  5. Rob1bureau
    Replies:
    1
    Views:
    797
    joris
    Feb 27, 2010
Loading...

Share This Page