[Bug testsuite/126708] [17 Regression] attr-callback.c failures

"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126708

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Josef Melcr <[email protected]>:

https://gcc.gnu.org/g:37807a10d8816f650d38d6f59a4e230ddc9f785a

commit r17-3181-g37807a10d8816f650d38d6f59a4e230ddc9f785a
Author: Josef Melcr <[email protected]>
Date:   Thu Jul 30 15:21:19 2026 +0200

    Use positional_argument in callback_only attribute handler

    This patch replaces some of the manual bounds checking done in the
    callback_only attribute handler with calls to positional_argument.
    Since positional_argument issues warnings and the attribute handler
    issues errors, I decided to downgrade the errors to warnings for
    consistency.

            PR testsuite/126708

    gcc/c-family/ChangeLog:

            * c-attribs.cc (handle_callback_only_attribute): Use
            positional_argument for bounds checking in callback_only
            attribute handler, downgrade errors to warnings for
            consistency.

    gcc/testsuite/ChangeLog:

            * gcc.dg/attr-callback.c: Expect warnings instead of errors,
            adjust expected messages.

    Signed-off-by: Josef Melcr <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.