Re: Failure on compile

Hi Bill,

On 10/15/2003 02:03 AM, Bill Richardson wrote:
> cr-sel-eng.c
> in function: id_add_sel_matches_node
> line139: parse error before 'result' 
> the line is
> 139:    gboolean result = FALSE ;
> 140     xmlChar *id = NULL ;

It's a problem with gcc-2.95 or earlier. Originally, C doesn't allow
variable declarations mixed in the middle of a block. Take a look at
line 133, it's a call to g_return_val_if_fail(). The declarations of
result and id should be placed before this call.

Starting from gcc-3, however, this is allowed as an extension to the
original C language. Refer to
<>. Therefore,
you can either manually modify those violating lines (there are some
more that file) or switch to gcc-3.


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