-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
formatting fixes, suppress expected warnings and fix things our imple…
…mentation does not support
- Loading branch information
Showing
60 changed files
with
807 additions
and
570 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,5 @@ int main(void) { | |
return 2; | ||
} | ||
|
||
return 0; // success | ||
return 0; // success | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
tests/chapter_18/valid/no_structure_parameters/parse_and_lex/postfix_precedence.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
// postfix operators have higher precedence than prefix | ||
struct inner { | ||
int inner_arr[3]; | ||
int inner_arr[3]; | ||
}; | ||
|
||
struct outer { | ||
int a; | ||
struct inner b; | ||
int a; | ||
struct inner b; | ||
}; | ||
|
||
int main(void) { | ||
struct outer array[4] = {{1, {{2, 3, 4}}}, | ||
{5, {{6, 7, 8}}}, | ||
{9, {{10, 11, 12}}}, | ||
{13, {{14, 15, 16}}}}; | ||
struct outer array[4] = {{1, {{2, 3, 4}}}, | ||
{5, {{6, 7, 8}}}, | ||
{9, {{10, 11, 12}}}, | ||
{13, {{14, 15, 16}}}}; | ||
|
||
int i = -array[2].b.inner_arr[1]; | ||
return i == -11; | ||
int i = -array[2].b.inner_arr[1]; | ||
return i == -11; | ||
} |
14 changes: 7 additions & 7 deletions
14
tests/chapter_18/valid/no_structure_parameters/parse_and_lex/space_around_struct_member.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
struct s { | ||
int a; | ||
int a; | ||
}; | ||
int main(void) { | ||
// struct member operator (.) can be separate by whitespace from | ||
// both struct and field name | ||
struct s foo; | ||
foo. a=10; | ||
int b = foo .a ; | ||
// struct member operator (.) can be separate by whitespace from | ||
// both struct and field name | ||
struct s foo; | ||
foo .a = 10; | ||
int b = foo .a; | ||
|
||
return foo . a == b; | ||
return foo . a == b; | ||
} |
6 changes: 3 additions & 3 deletions
6
...s/chapter_18/valid/no_structure_parameters/parse_and_lex/struct_member_looks_like_const.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
struct s { | ||
int E10; | ||
int E10; | ||
}; | ||
|
||
int main(void) { | ||
struct s x1 = {3}; | ||
return x1.E10; // lex correctly, recognizing that 1.E10 is not a constant | ||
struct s x1 = {3}; | ||
return x1.E10; // lex correctly, recognizing that 1.E10 is not a constant | ||
} |
Oops, something went wrong.