11
22## Intro
3- Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux. This approach makes Cake useful in real and existing programs.
3+ Cake works as an extension for MSVC on Windows and as an extension for GCC on Linux.
4+ This approach makes Cake useful in real and existing programs.
45
56When applicable, Cake uses the same command line options of MSVC and GCC.
67
@@ -9,7 +10,6 @@ For static analyzer concepts of ownership and nullable pointers visit [ownershi
910
1011## Include directories
1112
12-
1313On Windows, Cake can be used on the command line similarly to MSVC.
1414Cake reads the ` INCLUDE ` variable, the same variable used by MSVC to locate the include directories.
1515
@@ -142,6 +142,8 @@ Format input (format before language conversion)
142142#### -fo
143143Format output (format after language conversion, result parsed again)
144144
145+ #### -ir
146+ Generates C89 code
145147
146148#### -Wname -Wno-name (same as GCC)
147149Enables or disable warnings.
@@ -327,8 +329,10 @@ Becomes (not implemented)
327329``` c
328330struct s {
329331 int n;
330- double d[]; //?
332+ double d[1];
331333};
334+
335+ // TODO sizeof
332336```
333337
334338
@@ -358,17 +362,15 @@ int main()
358362
359363```
360364
361- `static` is removed when target is < c99.
362-
363- Cakes verifies that the argument is an array of with equal or more elements.
364-
365- Cakes extend this check for arrays without static as well.
365+ Cake verifies that the argument is an array with at
366+ least the specified number of elements.
367+ It extends this check to arrays without a static size as well.
366368
367369### C99 Complex and imaginary support
368370Not implemented
369371
370372### C99 Universal character names (\u and \U)
371- TODO
373+ Not implemented
372374
373375### C99 Hexadecimal floating constants
374376
@@ -382,13 +384,12 @@ Becomes in C89
382384double d = 2.000000 ;
383385```
384386
385- Cake converts the hexadecimal floating to decimal
386- floating point using strtod then snprintf.
387- That means this conversion is not precise .
387+ Cake converts hexadecimal floating-point values to decimal floating-point
388+ representation using strtod followed by snprintf.
389+ This conversion may introduce precision loss .
388390
389391### C99 Compound literals
390392
391-
392393``` c
393394struct s {
394395 int i;
@@ -404,7 +405,7 @@ int f(void) {
404405}
405406```
406407
407- Becomes in C89 (not implemented yet)
408+ Becomes in C89
408409
409410```c
410411struct s {
@@ -420,6 +421,7 @@ int f(void) {
420421 return p == q && q -> i == 1;
421422}
422423```
424+
423425N716
424426https://www.open-std.org/jtc1/sc22/wg14/www/docs/n716.htm
425427
@@ -437,7 +439,7 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n716.htm
437439
438440```
439441
440- Becomes C89 (not implemented yet)
442+ Becomes C89
441443
442444```c
443445int main()
@@ -555,7 +557,7 @@ When compiling to versions < C11 \_Static\_Assert is removed.
555557
556558### C11 Anonymous structures and unions
557559
558- It is implemented, however the conversion to C99, C89 was not implemented.
560+ It is implemented, however the conversion to C99, C89 was not implemented yet .
559561
560562```c
561563struct v {
@@ -572,8 +574,6 @@ int main(){
572574}
573575```
574576
575- I think a possible alternative to convert to C89,C99 is insert a name.
576-
577577
578578### C11 \_Noreturn
579579
0 commit comments