Live data from Hacker News

Viewing profile — xcgvgh

xcgvgh

HN member
Joined
Wed, Jan 06, 2016, 5:03 PM UTC
HN karma
1
Public activity
17 items

About xcgvgh

No profile information was provided.

Recent public activity

  1. comment
    Comment #10909720

    It's also very dangerous.

  2. comment
    Comment #10908913

    There is no reinventing going on here. In C you have to write relatively low level code. This includes manually calling allocs for objects, which includes the code for checking you…

  3. comment
    Comment #10908708

    Using calloc instead of malloc, just for checking arithmetic overflow, is superfluous. You can always write a check or a wrapper for malloc that does that automatically. It is so e…

  4. comment
    Comment #10908681

    The assignment is a conversion from unsigned to signed, if the value cannot be represented by the signed type, the result is implementation defined or an implementation defined sig…

  5. comment
    Comment #10908622

    I understand. If I change the argument to: size_t is capable of holding the largest array index" , then this must be correct, or is there still something I missed?

  6. comment
    Comment #10908498

    >size_t is defined as "an integer capable of holding the >largest array index" >>No, it isn't. Could anyone elaborate? I don't see how could someone allocate more than SIZE_MAX byt…

  7. comment
    Comment #10888284

    If I'm reading it correctly it got denied because it would be too similar to an already existing trademark: LP LET’S PLAY . Yuck...

  8. comment
    Comment #10871325

    I apologize. I wasn't aware of extended integer types.

  9. comment
    Comment #10869450

    There are no such things in the C Standard.

  10. comment
    Comment #10869103

    Typedef doesn't create a new type, it merely creates a new name for a type. I don't know what you mean by implementation defined integer type. If the implementation is conforming, …

  11. comment
  12. comment
    Comment #10865052

    With my assumption, it will be defined as an unsigned char, as it should be.

  13. comment
    Comment #10864728

    In the second to last paragraph; did you hint that wrapping a char*, used as a string, into a struct, to get type safety?

  14. comment
    Comment #10864708

    I think the whole article needs a preface, assuming CHAR_BIT is defined as 8 .

  15. comment
    Comment #10864645

    I use long when I need an int that can always represent ranges in -2^31-1 to 2^31-1, no assumptions necessary. Same goes for unsigned versions and long long.

  16. story
  17. story