Re: Warning fix in gnome-libs/libgnomeui/gnome-less.c




On Fri, 8 May 1998, Miguel de Icaza wrote:
> 
> I am curious, as there was a discussion on what is correct:
> 
> const char *x or char const *x.
>

I can't find it in K&R, but Stroustrup says 
const char * x 
is a pointer to a constant, while 
char * const x
is a constant pointer, and
char const * x 
is a synonym for const char * x.

The last is maybe C++-only? No idea. I often just try something and see if
the compiler barfs, or look at man pages (strtok is good for remembering
this).

To get a little back on topic - gnome-libs could use a cleanup, fixing
stuff like this, adding g_return_if_fail() checks, adding better comments,
removing the rest of the -Wall warnings, etc., etc. The copyright notices
are also a mess, though fixing that might involve mailing people paperwork
or something. Yet another TODO list item...
 
Havoc






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]