-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes in tri-pp, bump up its version
- Loading branch information
1 parent
89630b8
commit c7a6357
Showing
8 changed files
with
77 additions
and
15 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <stdlib.h> | ||
|
||
struct S1 | ||
{ | ||
struct S1* f1; | ||
}; | ||
|
||
struct S2 | ||
{ | ||
struct S1* f2; | ||
}; | ||
|
||
int main() | ||
{ | ||
struct S2 s2; | ||
s2.f2 = malloc(sizeof(*s2.f2)); | ||
s2.f2->f1 = s2.f2; | ||
return 0; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <stdlib.h> | ||
|
||
struct S1 | ||
{ | ||
struct S1* f1; | ||
}; | ||
|
||
struct S2 | ||
{ | ||
struct S1* f2; | ||
}; | ||
|
||
int main() | ||
{ | ||
struct S2 s2; | ||
struct S1 **p = malloc(sizeof(s2.f2)); // p is S1**, s2.f2 is S1* | ||
*p = malloc(sizeof(*s2.f2)); // *p is S1*, *s2.f2 is S1 | ||
s2.f2 = *p; | ||
s2.f2->f1 = *p; // lhs is S1*, rhs is also S1* | ||
return 0; | ||
} |
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