-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
__attribute__((alloc_align(0))) int* foo1(int x, double y); | ||
__attribute__((alloc_align(1))) int* foo2(int x, double y); | ||
__attribute__((alloc_align(2))) int* foo3(int x, double y); | ||
__attribute__((alloc_align(3))) int* foo4(int x, double y); | ||
__attribute__((alloc_align(1))) int foo5(int x, double y); | ||
|
||
#define EXPECTED_ERRORS \ | ||
"alloc_align attribute.c:1:16: error: 'alloc_align' attribute parameter 1 is out of bounds" \ | ||
"alloc_align attribute.c:3:16: error: 'alloc_align' attribute argument may only refer to a function parameter of integer type" \ | ||
"alloc_align attribute.c:4:16: error: 'alloc_align' attribute parameter 1 is out of bounds" \ | ||
"alloc_align attribute.c:5:16: warning: 'alloc_align' attribute only applies to return values that are pointers [-Wignored-attributes]" \ | ||
|