diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-19 03:07:34 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-21 14:37:39 +0100 |
| commit | 172f6a98702de6eeef181fa72d07dfc78c5b40d1 (patch) | |
| tree | 9b9a7fa54010e581f38f48d7908283130fd79e5a /validation | |
| parent | 9305d48da0890d578254bd0e671e55a30b77ced0 (diff) | |
| download | sparse-dev-172f6a98702de6eeef181fa72d07dfc78c5b40d1.tar.gz | |
let function definition inherit prototype attributes
It's common to declare a function with the attribute
'pure' or 'noreturn' and to omit the attribute in the
function definition. It makes somehow sense since the
information conveyed by these attributes are destined
to the function users not the function itself.
So, when checking declaration/definition, let the
current symbol inherit any function attributes present
in previous declarations.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/function-redecl-funattr.c (renamed from validation/function-attribute-omitted.c) | 3 | ||||
| -rw-r--r-- | validation/function-redecl2.c | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/validation/function-attribute-omitted.c b/validation/function-redecl-funattr.c index 43b301d8..b1e2fb19 100644 --- a/validation/function-attribute-omitted.c +++ b/validation/function-redecl-funattr.c @@ -9,6 +9,5 @@ void __noreturn n(void); void n(void) { while (1) ; } /* - * check-name: function-attribute-omitted - * check-known-to-fail + * check-name: function-redecl-funattr */ diff --git a/validation/function-redecl2.c b/validation/function-redecl2.c index 3435aa00..ef396137 100644 --- a/validation/function-redecl2.c +++ b/validation/function-redecl2.c @@ -25,7 +25,4 @@ void func2(int a) /* * check-name: function-redecl2 - * - * check-known-to-fail - * */ |
