Ticket #1428 (closed bug: fixed)
pbc_merge breaks c++ build
Reported by: | NotFound | Owned by: | dukeleto |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | tools | Version: | 2.0.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
At r43774 a C++ build fails:
src/pbc_merge.c: In function ‘void pbc_merge_ctpointers(parrot_interp_t*, pbc_merge_input**, int, PackFile_ByteCode*)’: src/pbc_merge.c:664: warning: overflow in implicit constant conversion src/pbc_merge.c:664: error: duplicate case value src/pbc_merge.c:663: error: previously used here make: *** [src/pbc_merge.o] Error 1
The problematic cases are PARROT_ARG_SC and PARROT_ARG_NAME_SC, which are:
PARROT_ARG_SC = PARROT_ARG_STRING | PARROT_ARG_CONSTANT, PARROT_ARG_NAME_SC = PARROT_ARG_NAME | PARROT_ARG_STRING | PARROT_ARG_CONSTANT
and
PARROT_ARG_NAME = 0x0200,
But the switch expression is op->types[cur_arg - 1], which is a char, thus the 0x200 overflows, as the compiler says.
Change History
Note: See
TracTickets for help on using
tickets.