Re: GLib on Solaris
- From: Max Avramenko <max_avramenko yahoo com>
- To: gtk-devel-list redhat com
- Subject: Re: GLib on Solaris
- Date: 03 May 2000 11:32:18 -0400
Darin Adler <email@example.com> writes:
> > 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
> definitive response.
] [Thread Prev