Re: error: parse error before numeric constant

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Tue, 18 Nov 2003 10:28:16 +0200

On 17 Nov 2003, at 22:09, Henrik Nordstrom <hno@squid-cache.org> wrote:

> On Mon, 17 Nov 2003, Andres Kroonmaa wrote:
>
> > gcc (3.3.1 and 3.3.2) produce error whenever there is variable
> > definition with all uppercase:
> >
> > protos.h
> > -SQUIDCEXTERN void fwdServersFree(FwdServer ** FS);
> > +SQUIDCEXTERN void fwdServersFree(FwdServer ** fs);
>
> Most likely there is a #define FS in some include file somewhere in
> your system...

 indeed:
/usr/include/ia32/sys/reg.h:#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
/usr/include/ia32/sys/reg.h:#define CS 15
/usr/include/ia32/sys/reg.h:#define FS 1
/usr/include/ia32/sys/reg.h:#define PS EFL

 register names defined to have index into some array..
 Had same issue with CS and PS also. Maybe more to come.

 Its Solaris8 x86 system, btw.

> gcc -E will show what the above looks like to the C++ compiler after
> preprocessor expansions..

static void
peerAddFwdServer(FwdServer ** 1, peer * p, hier_code code)
{
...
    while (*1)
        1 = &(*1)->next;

    *1 = fs;
}

 So, then, what is correct way to solve this? Rename vars in all cases
 that conflict? I'll submit you a patch with rename changes, and you'll
 review for consistent naming conventions, ok?

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Data AS
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn
 11317 Estonia
Received on Tue Nov 18 2003 - 01:41:01 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:20:47 MST