diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-15 00:06:14 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-15 01:42:54 +0100 |
| commit | 233d4e17c544e1de252aed8f409630599104dbc7 (patch) | |
| tree | 83f39dd2618b8656d342a8a0bd946452e8d1f010 /validation/nested-declarator2.c | |
| parent | fd3528aa0409874386610ce63bb647fff8312fd9 (diff) | |
| download | sparse-dev-233d4e17c544e1de252aed8f409630599104dbc7.tar.gz | |
function attributes apply to the function declaration
Function attributes relate to the function declaration they
appear in. Sparse ignore most these attributes but a few ones
have a semantic value: 'pure', 'noreturn' & 'externally_visible'.
Due to how Sparse parse attributes and how these attributes
are stored for functions, the attributes 'pure' & 'noreturn'
are applied not to the function itself but its return type
if the function returns a pointer.
Fix this by extracting these attributes from the declaration
context and ensure they're applied to the declarator.
Reported-by: John Levon <john.levon@joyent.com>
Reported-by: Alex Kogan <alex.kogan@oracle.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/nested-declarator2.c')
0 files changed, 0 insertions, 0 deletions
