Re: GLib on Solaris
- From: Darin Adler <darin eazel com>
- To: <gtk-devel-list redhat com>, Max Avramenko <max_avramenko yahoo com>
- Subject: Re: GLib on Solaris
- Date: Wed, 03 May 2000 08:18:07 -0700
> char * cp = <gpointer type pointer> does not compile.
It's not standard C to refuse to allow this assignment. You are supposed to
be able to assign from a void *, like gpointer, to another kind of pointer
like char *. Not allowing this is one of the changes made by C++. Are you
using your compiler in C++ mode or in some extra-picky mode?
> Usually I explicitly cast like this:
> char * cp = (char *) <gpointer type pointer>
This is a fine coding style choice, but it shouldn't be required. That's one
reason we have an ISO C standard, to prevent differences like this between
compilers from causing trouble.
On the other hand, the GLib maintainers may decide that they want these
casts added so that compilers that don't comply with the standard still can
be used to compile GLib. So you should wait to hear from them for a more
] [Thread Prev