[pypy-commit] stmgc use-gcc: Avoid 'uint8_t' as fields because gcc considers that read/writes to it
arigo
noreply at buildbot.pypy.org
Sat May 23 23:08:08 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: use-gcc
Changeset: r1764:c87e955695ac
Date: 2015-05-23 23:08 +0200
http://bitbucket.org/pypy/stmgc/changeset/c87e955695ac/
Log: Avoid 'uint8_t' as fields because gcc considers that read/writes to
it are like read/writes to a 'char *' pointer and can alias
anything. Instead, ':8' integers are equivalent but without the
aliasing problem.
diff --git a/c7/stmgc.h b/c7/stmgc.h
--- a/c7/stmgc.h
+++ b/c7/stmgc.h
@@ -38,11 +38,11 @@
'STM_SEGMENT->transaction_read_version' if and only if the
object was read in the current transaction. The nurseries
also have corresponding read markers, but they are never used. */
- uint8_t rm;
+ unsigned rm:8;
};
struct stm_segment_info_s {
- uint8_t transaction_read_version;
+ unsigned int transaction_read_version;
int segment_num;
char *segment_base;
stm_char *nursery_current;
More information about the pypy-commit
mailing list