On 01/05/2016 08:00 AM, Marek Polacek wrote:
At present, we fail to warn about wrong memory orders for certain atomic
functions.  This happens for macros in stdatomic.h.  The fix is to use the
expansion point location rather than the input location.

While at it, I made a trivial fix to the wording of one of the warnings: don't
start with a capital and don't end the warning with a fullstop.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2016-01-05  Marek Polacek  <pola...@redhat.com>

        PR c/69104
        * builtins.c (get_memmodel): Use expansion point location rather than
        the input location.  Call warning_at rather than warning.
        (expand_builtin_atomic_compare_exchange): Likewise.
        (expand_builtin_atomic_load): Likewise.
        (expand_builtin_atomic_store): Likewise.
        (expand_builtin_atomic_clear): Likewise.

        * gcc.dg/atomic-invalid-2.c: New.
OK.
jeff

Reply via email to