From: Bart Van Assche Date: Sat, 11 Sep 2010 10:07:56 +0000 (+0000) Subject: Second and last gcc 4.3.2 PowePC workaround. X-Git-Tag: svn/VALGRIND_3_6_0~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c016c63bcc3df539dd39981facf5a11a32a852;p=thirdparty%2Fvalgrind.git Second and last gcc 4.3.2 PowePC workaround. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11354 --- diff --git a/drd/tests/annotate_static.cpp b/drd/tests/annotate_static.cpp index 154ee030de..6c6fbabf7e 100644 --- a/drd/tests/annotate_static.cpp +++ b/drd/tests/annotate_static.cpp @@ -16,9 +16,15 @@ ANNOTATE_BENIGN_RACE_STATIC(s_i, "Benign because duplicate assignment."); /* Local functions. */ +static inline void AnnotateIgnoreReadsBegin() { ANNOTATE_IGNORE_READS_BEGIN(); } +static inline void AnnotateIgnoreReadsEnd() { ANNOTATE_IGNORE_READS_END(); } + static void* thread_func(void*) { - s_i = ANNOTATE_UNPROTECTED_READ(s_j); + AnnotateIgnoreReadsBegin(); + int i = s_j; + AnnotateIgnoreReadsEnd(); + s_i = i; return 0; }