gnu/gcc/c7e8bbbef58ea6eecb7aa6a3084162bebec4104d Return early if callback_only is not used on a function
There was a missing return statement in the attribute handler when
checking whether or not the attribute was used on a function. Since
positional_argument was introduced into the handler, this uncaught error
would result in an ICE. This patch fixes that.
gcc/c-family/ChangeLog:
* c-attribs.cc (handle_callback_only_attribute): Add early
return if the attribute is not used on a function.
gcc/testsuite/ChangeLog:
* gcc.dg/attr-callback.c: Add testcases for the early return.
Signed-off-by: Josef Melcr <josef.melcr@suse.com>
2 files changed