diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-07 21:24:09 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-01-07 21:24:09 (GMT) |
commit | 08b401f67a8dfacc339e5a73a87022236c306279 (patch) | |
tree | 35d91e1817d49deac396b2eba64c0c31e89d931b /Python/compile.c | |
parent | 406c640344b8a7300bb4a256abb91d22b746b13b (diff) | |
download | cpython-08b401f67a8dfacc339e5a73a87022236c306279.zip cpython-08b401f67a8dfacc339e5a73a87022236c306279.tar.gz cpython-08b401f67a8dfacc339e5a73a87022236c306279.tar.bz2 |
Fix icc warnings: single bit fields should be unsigned, shadowing local variables
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Python/compile.c b/Python/compile.c index 0d11d8a..0754ea5 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -51,9 +51,9 @@ int Py_OptimizeFlag = 0; #define DEFAULT_LNOTAB_SIZE 16 struct instr { - int i_jabs : 1; - int i_jrel : 1; - int i_hasarg : 1; + unsigned i_jabs : 1; + unsigned i_jrel : 1; + unsigned i_hasarg : 1; unsigned char i_opcode; int i_oparg; struct basicblock_ *i_target; /* target block (if jump instruction) */ @@ -74,9 +74,9 @@ typedef struct basicblock_ { block reached by normal control flow. */ struct basicblock_ *b_next; /* b_seen is used to perform a DFS of basicblocks. */ - int b_seen : 1; + unsigned b_seen : 1; /* b_return is true if a RETURN_VALUE opcode is inserted. */ - int b_return : 1; + unsigned b_return : 1; /* depth of stack upon entry of block, computed by stackdepth() */ int b_startdepth; /* instruction offset for block, computed by assemble_jump_offsets() */ @@ -1673,20 +1673,20 @@ compiler_addop_j(struct compiler *c, int opcode, basicblock *b, int absolute) } #define VISIT_SEQ(C, TYPE, SEQ) { \ - int i; \ + int _i; \ asdl_seq *seq = (SEQ); /* avoid variable capture */ \ - for (i = 0; i < asdl_seq_LEN(seq); i++) { \ - TYPE ## _ty elt = asdl_seq_GET(seq, i); \ + for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \ + TYPE ## _ty elt = asdl_seq_GET(seq, _i); \ if (!compiler_visit_ ## TYPE((C), elt)) \ return 0; \ } \ } #define VISIT_SEQ_IN_SCOPE(C, TYPE, SEQ) { \ - int i; \ + int _i; \ asdl_seq *seq = (SEQ); /* avoid variable capture */ \ - for (i = 0; i < asdl_seq_LEN(seq); i++) { \ - TYPE ## _ty elt = asdl_seq_GET(seq, i); \ + for (_i = 0; _i < asdl_seq_LEN(seq); _i++) { \ + TYPE ## _ty elt = asdl_seq_GET(seq, _i); \ if (!compiler_visit_ ## TYPE((C), elt)) { \ compiler_exit_scope(c); \ return 0; \ @@ -3859,7 +3859,7 @@ assemble_lnotab(struct assembler *a, struct instr *i) return 1; if (d_bytecode > 255) { - int i, nbytes, ncodes = d_bytecode / 255; + int j, nbytes, ncodes = d_bytecode / 255; nbytes = a->a_lnotab_off + 2 * ncodes; len = PyString_GET_SIZE(a->a_lnotab); if (nbytes >= len) { @@ -3871,7 +3871,7 @@ assemble_lnotab(struct assembler *a, struct instr *i) return 0; } lnotab = PyString_AS_STRING(a->a_lnotab) + a->a_lnotab_off; - for (i = 0; i < ncodes; i++) { + for (j = 0; j < ncodes; j++) { *lnotab++ = 255; *lnotab++ = 0; } @@ -3880,7 +3880,7 @@ assemble_lnotab(struct assembler *a, struct instr *i) } assert(d_bytecode <= 255); if (d_lineno > 255) { - int i, nbytes, ncodes = d_lineno / 255; + int j, nbytes, ncodes = d_lineno / 255; nbytes = a->a_lnotab_off + 2 * ncodes; len = PyString_GET_SIZE(a->a_lnotab); if (nbytes >= len) { @@ -3895,7 +3895,7 @@ assemble_lnotab(struct assembler *a, struct instr *i) *lnotab++ = 255; *lnotab++ = d_bytecode; d_bytecode = 0; - for (i = 1; i < ncodes; i++) { + for (j = 1; j < ncodes; j++) { *lnotab++ = 255; *lnotab++ = 0; } @@ -4190,7 +4190,7 @@ assemble(struct compiler *c, int addNone) /* Emit code in reverse postorder from dfs. */ for (i = a.a_nblocks - 1; i >= 0; i--) { - basicblock *b = a.a_postorder[i]; + b = a.a_postorder[i]; for (j = 0; j < b->b_iused; j++) if (!assemble_emit(&a, &b->b_instr[j])) goto error; |