3

I'm using mostly GCC to develop my library, but I'd like to ensure cross-compiler compatibility and especially standard conformance as much as possible. For this, I have add several -W... flags to command line. I'd also add -pedantic, but I have a problem with its warning about long long type. The latter is important for my library and is properly guarded with #if code, i.e. is not compiled on compilers that don't know it anyway.

In short: can I have GCC in -pedantic mode warn about any extension except long long?

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • You may want to consider including `` and using C99-style `int64_t` or `uint64_t` instead. – Joey Adams Apr 22 '10 at 20:14
  • @Joey Adams: Good idea, I need to look into that, might also eliminate certain complications in the code. –  Apr 22 '10 at 20:18

1 Answers1

3

add -Wno-long-long , or switch to C99 (use the gcc flag -std=c99). c99 provides long long.

nos
  • 223,662
  • 58
  • 417
  • 506
  • Oh, I feel stupid now. I knew about disabling specific warnings but for some reason it never occurred to me I could disable warnings from `-pedantic` this way too. Thanks, that works! –  Apr 22 '10 at 20:16