C99 changes vs C89
ccのコードの中にこんなファイルがあった.
Named initializers (Designated Initializer)がDoneになっているなぁと思って,確かめてみたら,C99と同じ書き方でちゃんと動いた.ということで,C99と同じに書けるけど,既存のコードを読むには,Plan9拡張があることを頭の隅に入れておくとよい.
cc/c99 1: C99 changes vs C89 2: http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html 3: 4: (Numbers are from the web page list.) 5: 6: Not done (yet?): 7: 9, 19. Hexdecimal floating point constants. 8: 11. _Complex, _Imaginary, _Bool 9: 14. Variable arrays in parameter lists. 10: 33. Variable-length arrays 11: 34. goto restrictions for variable-length arrows 12: 18. Notation for universal characters \uXXXX 13: 25. Division and mod truncate toward zero. 14: 26. _Bool, float _Complex, double _Complex, long double _Complex 15: 16: Done: 17: 11, 30, 31, 32. restrict, inline 18: 12. Allow declarations anywhere. 19: 15. for loop declarations 20: 28. structs ending in incomplete type. 21: 22: Unneeded (already had): 23: 1. Translation limits 24: 6. Empty macro arguments allowed. 25: 8. #line limit 26: 10 // comments 27: 16. (Type){initializer list} compound literals 28: 17. Named initializers 29: 20. LL suffix for long long constants 30: 21. IEEE 754 floating-point arithmetic 31: 22. Long long type, 64 bits wide. 32: 24. Initializers for auto aggregates can be non-constants. 33: 26. long long int, unsigned long long int, signed long long int 34: 27. require at least one type specifier in a declaration 35: 29. Idempotent type qualifiers. 36: 37: Unwanted: 38: 2. #pragma stdc 39: 3. _Pragma 40: 4. __STDC_VERSION__ 41: 5. __STDC_IEC_559__, __STDC_IEC_559_COMPLEX__, 42: __STDC_ISO_10646__ 43: 7. __VA_ARGS__ 44: 13. Digraph tokens 45: 23. __func__ identifier