Top "C99" questions

This tag is for questions regarding the International Standard ISO 9899:1999, aka "C99", with technical corrigenda, and for questions about code written in C99 (as opposed to K&R C, C89 or later C Standard revisions like the 2011 revision C11).

How to do an explicit fall-through in C

The newer versions of gcc offer the Wimplicit-fallthrough, which is great to have for most switch statements. However, I have …

c gcc c99 gcc-warning
What techniques/strategies do people use for building objects in C (not C++)?

I am especially interested in objects meant to be used from within C, as opposed to implementations of objects that …

c inheritance object c99 c89
Return value range of the main function

What does standard say about main return values range? Say only up to 255? Because int main(void){ return 256; } echo $? ; # out 0

c posix c99 exit-code
C99 complex support with visual studio

I would like to use complex numbers as defined in C99, but I need to support compilers which do not …

c visual-studio c99 complex-numbers
What's the difference between "int" and "int_fast16_t"?

As I understand it, the C specification says that type int is supposed to be the most efficient type on …

c integer c99 portability c89
C type casts and addition precedence

What's the precedence in the next expression? item = (char*)heap + offset; Is it (char*)(heap + offset) or ((char*)heap) + offset?

c syntax c99
Variadic macros with 0 arguments in C99

I have some debugging code that looks like the following: #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) #define …

macros c99 variadic
Should I use ANSI C (C89)?

It's 2012. I'm writing some code in C. Should I be still be using C89? Are there still compilers that do …

c c99 c89 ansi-c
When to use restrict and when not to

I have a general understanding of restrict but I'm hoping to clarify some fine points. I have a function that …

c pointers c99 restrict-qualifier
Storage size of timespec isn't known

I have seen this solution but I am getting the same errors. For a class, we had to switch to …

c linux gnu c99 timespec