-
Notifications
You must be signed in to change notification settings - Fork 16.8k
__attribute__((malloc)) with arguments #51607
Copy link
Copy link
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"extension:gnu
Description
| Bugzilla Link | 52265 |
| Version | trunk |
| OS | All |
| CC | @zygoloid |
Extended Description
GCC 11.x added support for arguments to attribute (malloc):
For example:
$ cat test.c
typedef struct my_s {} my;
void myclose (my*);
attribute ((malloc, malloc (myclose))) my* myopen(void);
$ gcc-11 -c test.c
(works)
$ clang-13 -c test.c
test.c:3:25: error: 'malloc' attribute takes no arguments
attribute ((malloc, malloc (myclose))) my* myopen(void);
^
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"extension:gnu