Summary of the main changes:
- external identifier now are case sensitive and up 31 characters (in old standard a portable program should not rely on case sensitiveness nor to more of 6 chars)
- variable argument on macros
- from C++: // comment, inline, declaration and statement can mix, for allow declaration in first "argument"
- compound literals
- initializers: int a[10] = { [5] = 3}; struct {int a,b} c = { .b=3};
- long long (64-bit or longer) with LL, ll, ULL and ull suffixes in costants
- __func__ "automatic variable" : void f(int void) { fprint("me is %s\n", __func__); }
- _Bool and if you #include
you have bool, true and false restrict
keyword to optimize function: you tell compiler that pointers don't point overlapping regions.- variable-length arrays
In http://www.open-std.org/jtc1/sc22/wg14/www/standards.html#9899 you see the complete standard with the two corrigenda, and the rationale about the new standard. It worth to browse it!
No comments:
Post a Comment