Top "C89" questions

This tag is for questions regarding the international standard ISO 9899:1990, also known as "C89", "C90" or "ANSI C", with amendments and technical corrigenda (as opposed to K&R C, C99, C11 or later C standard revisions).

Is the "struct hack" technically undefined behavior?

What I am asking about is the well known "last member of a struct has variable length" trick. It goes …

c undefined-behavior c89
Is it safe to cast size_t to unsigned long int?

I need a portable way to print the value of a variable n of type size_t. Since I use …

c c89
Does ANSI-C not know the inline keyword?

When compiling something as simple as inline int test() { return 3; } int main() { test(); return 0; } with gcc -c test.c, everything …

c inline c89
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
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
C90: How do I globally initialize this struct in C without C99 extensions

I was wondering what the best way to initialize this struct is with C90, while still keeping it neat. In …

c struct global declare c89
Should I use "-ansi" or explicit "-std=..." as compiler flags?

I've read that ANSI C is not exactly the same as ISO C and compilers may differ in interpretation of …

c c89 compiler-flags ansi-c
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
c - Declaring a variable with both register and static storage classes

(ANSI-C 89) Hi, is it possible to declare a variable both static and register ? When ever I try to do this …

c gcc static c89 register-allocation