Re: staging broken with --enable-debugging-features

Etienne Gagnon <[email protected]>
Newsgroups gmane.comp.java.vm.sablevm.devel
Organization UQAM
Message-ID <[email protected]>
After investigation, I must change my verdict.

The ISO C standard says:

    6.2.2.3 Pointers
        [#1] A pointer to void may be converted to or from a pointer
        to  any  incomplete  or  object  type.   A  pointer  to  any
        incomplete or object type may be converted to a  pointer  to
        void  and  back again; the result shall compare equal to the
        original pointer.
        ...
        [#8] A pointer to a function of one type may be converted to
        a  pointer to a function of another type and back again; the
        result shall compare equal to the original  pointer.   If  a
        converted pointer is used to call a function that has a type
        that is not compatible with the type of the called function,
        the behavior is undefined.

So, you should try something like:


method->data.native_method->code =
  __entension__ (void (*)(void))
  lt_dlsym (native_library->handle,
            method->data.native_method->short_name);

Maybe GCC allows for this...

Etienne


Etienne Gagnon wrote:
> The code converts a "lt_ptr" to a function pointer.  Looking at ltdl.h, 
> I found that "lt_ptr" is a "void *".  In my understanding of the ISO C 
> standard, "void" is not an object, it is "nothing/everything".  So, this 
> warning makes little sense to me.  Unless I (mentally) mis-preprocessed 
> the definition of lt_ptr in the header file.

-- 
Etienne M. Gagnon, Ph.D.             http://www.info.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

_______________________________________________
SableVM-devel mailing list
[email protected]
http://sablevm.org/lists/control/listinfo/sablevm-devel
signature.asc (application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBtz1/jyrJi4rH84gRAqK1AJ9gr3k5RbJO9Nr4hmHDBcyX9tIO7wCcD2WH
zFgvrLPQtbiiLBAkbJprfX8=
=QN7H
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.