Re: Failure on compile
- From: Selwyn Tang <selwyn hectrix com>
- To: Bill Richardson <wrichardson austin rr com>
- Cc: garnome-list gnome org
- Subject: Re: Failure on compile
- Date: Wed, 15 Oct 2003 09:36:35 +0800
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
<http://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_5.html#SEC93>. Therefore,
you can either manually modify those violating lines (there are some
more that file) or switch to gcc-3.
Selwyn
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]