intptr_t standard?

Discussion in 'C Programming' started by nikanth@gmail.com, Aug 7, 2006.

  1. Guest

    Isn't intptr_t part of the latest ISO C++?
    It is part of the C99 standard but C++? Has any new standard for C++
    after C++ 2003 which is almost same as C++98 published?
    Which are the compilers that supports it completely?

    on gcc (GCC) 3.3.3 (SuSE Linux) I dont get any error when using
    intptr_t even after specifying -std=c89

    http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=223&rl=1

    Is any new standard for C published after C99?
    , Aug 7, 2006
    #1
    1. Advertising

  2. said:

    [OT stuff snipped]

    > on gcc (GCC) 3.3.3 (SuSE Linux) I dont get any error when using
    > intptr_t even after specifying -std=c89


    A diagnostic is required - and gcc gives one when invoked in conforming
    mode:

    foo.c:8: `intptr_t' undeclared (first use in this function)

    > Is any new standard for C published after C99?


    Not yet. Give them time.

    --
    Richard Heathfield
    "Usenet is a strange place" - dmr 29/7/1999
    http://www.cpax.org.uk
    email: rjh at above domain (but drop the www, obviously)
    Richard Heathfield, Aug 7, 2006
    #2
    1. Advertising

  3. writes:
    > Isn't intptr_t part of the latest ISO C++?
    > It is part of the C99 standard but C++? Has any new standard for C++
    > after C++ 2003 which is almost same as C++98 published?
    > Which are the compilers that supports it completely?


    We don't know. This is comp.lang.c. comp.lang.c++ is down the hall,
    third door on the left, just past the water cooler.

    > on gcc (GCC) 3.3.3 (SuSE Linux) I dont get any error when using
    > intptr_t even after specifying -std=c89
    >
    > http://www.informit.com/guides/content.asp?g=cplusplus&seqNum=223&rl=1


    intptr_t is defined in <stdint.h>, which is a new standard header in
    C99. As far as C89/C90 is concerned, <stdint.h> is a non-standard
    header; #including it and using declarations from it doesn't warrant a
    warning any more than using any other non-standard header.

    > Is any new standard for C published after C99?


    There's not a full standard, but there have been two Technical
    Corrigenda. A version of the C99 standard with TC1 and TC2 merged
    into it is freely available as n1124.pdf (Google it).

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, Aug 7, 2006
    #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. steve.leach

    How standard is the standard library?

    steve.leach, Apr 18, 2005, in forum: Python
    Replies:
    1
    Views:
    373
    Christos TZOTZIOY Georgiou
    Apr 18, 2005
  2. funkyj
    Replies:
    5
    Views:
    1,110
    funkyj
    Jan 20, 2006
  3. Richard Tobin

    Messing with intptr_t

    Richard Tobin, Oct 11, 2006, in forum: C Programming
    Replies:
    2
    Views:
    966
    SM Ryan
    Oct 11, 2006
  4. king

    intptr_t

    king, Aug 7, 2006, in forum: C++
    Replies:
    5
    Views:
    726
    P.J. Plauger
    Aug 7, 2006
  5. Jeroen Schot
    Replies:
    4
    Views:
    1,483
    Marcin Grzegorczyk
    Oct 6, 2010
Loading...

Share This Page