https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105149

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:6e2743687202c58a6553ae632ebbada3de38ad48

commit r12-8057-g6e2743687202c58a6553ae632ebbada3de38ad48
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Apr 8 09:16:30 2022 +0200

    c: Error on va_arg with function type [PR105149]

    In the PR Joseph said that the C standard for va_arg talks about
    pointers to object type and as a function type is not object type,
    it is invalid.

    The following patch diagnoses it in the FE, instead of ICEing later on
    when optimizations are turned on (and with -O0 doing something weird
    at runtime).

    2022-04-08  Jakub Jelinek  <ja...@redhat.com>

            PR c/105149
            * c-typeck.cc (c_build_va_arg): Reject function types.

            * gcc.dg/pr105149.c: New test.

Reply via email to