This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71675] __atomic_compare_exchange_n returns wrong type for typed enum


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

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Jul 22 18:32:08 2016
New Revision: 238664

URL: https://gcc.gnu.org/viewcvs?rev=238664&root=gcc&view=rev
Log:
PR c++/71675 - __atomic_compare_exchange_n returns wrong type for typed enum

gcc/c-family/ChangeLog:

        PR c++/71675
        * c-common.c (resolve_overloaded_builtin): Avoid converting
        __atomic_compare_exchange_n return type to that of what its
        first argument points to.

gcc/testsuite/ChangeLog:

        PR c++/71675
        * g++.dg/ext/atomic-3.C: New test.
        * gcc.dg/atomic/pr71675.c: New test.


Added:
    trunk/gcc/testsuite/g++.dg/ext/atomic-3.C
    trunk/gcc/testsuite/gcc.dg/atomic/pr71675.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]