Clean up atomic tests

Richard Henderson rth@redhat.com
Mon Nov 18 08:58:00 GMT 2013


On 11/08/2013 02:43 AM, Joseph S. Myers wrote:
> This patch cleans up various issues with the tests of atomics built-in
> functions and libatomic functions, in preparation for adapting those
> tests to add test coverage of stdatomic.h macros.  The tests were
> missing a return type for main (C11 doesn't allow implicit int return
> types).  Some tests were incrementing a variable in one part of an
> expression and using its value in another part without a sequence
> point in between.  And the libatomic tests shouldn't have been
> restricted to targets with hardware sync_* support, or adding
> command-line options to make such support available, since they are
> built with -fno-inline-atomics anyway to ensure the library
> functionality is what's tested, and the library is meant to cover all
> types regardless of what hardware support may be available.
> 
> Tested for x86_64-unknown-linux-gnu.  OK to commit?

Ok.


r~



More information about the Gcc-patches mailing list