#60772: chez-scheme @9.5.2: error: cast to 'ptr' (aka 'void *') from smaller integer type

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

#60772: chez-scheme @9.5.2: error: cast to 'ptr' (aka 'void *') from smaller integer type

macports-4
#60772: chez-scheme @9.5.2: error: cast to 'ptr' (aka 'void *') from smaller
integer type
------------------------+-------------------------
 Reporter:  ryandesign  |      Owner:  mohd-akram
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.6.2
 Keywords:              |       Port:  chez-scheme
------------------------+-------------------------
 [https://build.macports.org/builders/ports-10.6_x86_64-builder/builds/29567/steps
 /install-port/logs/stdio chez-scheme fails to build] with newer compilers:

 {{{
 alloc.c:49:9: error: cast to 'ptr' (aka 'void *') from smaller integer
 type 'unsigned int' [-Werror,-Wint-to-void-pointer-cast]
         find_room(space_new, 0, type_typed_object, size_vector(0),
 S_G.null_vector);
         ^
 ./types.h:84:26: note: expanded from macro 'find_room'
     S_G.next_loc[s][g] = (ptr)((uptr)X + (n));\
                          ^
 alloc.c:49:9: error: cast to 'ptr' (aka 'void *') from smaller integer
 type 'int' [-Werror,-Wint-to-void-pointer-cast]
 ./types.h:86:11: note: expanded from macro 'find_room'
     (x) = TYPE(X, t);\
           ^
 ./types.h:229:23: note: expanded from macro 'TYPE'
 #define TYPE(x,type) ((ptr)((iptr)(x) - typemod + (type)))
                       ^
 alloc.c:50:9: error: cast to 'iptr *' (aka 'int *') from smaller integer
 type 'unsigned int' [-Werror,-Wint-to-pointer-cast]
         VECTTYPE(S_G.null_vector) = (0 << vector_length_offset) |
 type_vector;
         ^
 ../boot/ti3osx/equates.h:795:24: note: expanded from macro 'VECTTYPE'
 #define VECTTYPE(x) (*((iptr *)((uptr)(x)+1)))
                        ^
 }}}

 Older compilers probably didn't have this warning.

 This demonstrates why we don't want ports to build with `-Werror`.

--
Ticket URL: <https://trac.macports.org/ticket/60772>
MacPorts <https://www.macports.org/>
Ports system for macOS