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

--- Comment #7 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:1fcfd224ff67afd08ea5aa66a8bd687bb21798b2

commit r14-5639-g1fcfd224ff67afd08ea5aa66a8bd687bb21798b2
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Tue Nov 21 10:03:26 2023 +0100

    testsuite: Fix up pr111309-2.c on arm [PR111309]

    ARM defaults to -fshort-enums and the following testcase FAILs there in 2
    lines.  The difference is that in C++, E0 has enum E type, which normally
    has unsigned int underlying type, so it isn't int nor something that
    promotes to int, which is why we diagnose it (in C it is promoted to int).
    But with -fshort-enums, the underlying type is unsigned char in that case,
    which promotes to int just fine.

    The following patch adjusts the expectations, such that we don't expect
    it on arm or when people manually test with -fshort-enums.

    2023-11-21  Jakub Jelinek  <ja...@redhat.com>

            PR c/111309
            * c-c++-common/pr111309-2.c (foo): Don't expect errors for C++ with
            -fshort-enums if second argument is E0.

Reply via email to