1

I am writing a header file in c, and i have the problem that there are many warnings, all of them because of big numbers, which need to be unsigned. How can i block all of the warnings that come up in the header file, without blocking the others, from outside of the header?

Thanks

  • 4
    Try putting a `U` after the big numbers that need to be unsigned. Better yet, post a portion of the header file that's causing problems. See [mcve]. – user3386109 May 20 '20 at 20:35
  • The U Solution worked but i wonder why, -9223372036854775808 needs an U at the end. – Björn Max Jakobsen May 20 '20 at 23:19
  • That particular value is not guaranteed to fit into a 64-bit number because the C standard does not mandate 2's complement representation of integers. On a 2's complement system where `long long` is 64-bits, you can use the `LLONG_MIN` macro found in `` for that value. – user3386109 May 21 '20 at 00:19
  • @BjörnMaxJakobsen: Perhaps there is a clue in this answer: https://stackoverflow.com/a/34725116/1566221 – rici May 21 '20 at 02:59
  • Answer in the comments under the original post [here](https://stackoverflow.com/questions/61922335/blocking-warnings-in-c-header-files) – Björn Max Jakobsen May 25 '20 at 14:16

0 Answers0