#1428: pbc_merge breaks c++ build
----------------------+-----------------------------------------------------
 Reporter:  NotFound  |       Owner:  dukeleto
     Type:  bug       |      Status:  new     
 Priority:  blocker   |   Milestone:          
Component:  tools     |     Version:  2.0.0   
 Severity:  medium    |    Keywords:          
     Lang:            |       Patch:          
 Platform:            |  
----------------------+-----------------------------------------------------
 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.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1428>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to