[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: c syntax problems with solaris forte compiler

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-08-16 16:33:14 CEST

solo turn <soloturn99@yahoo.com> writes:

> the solaris compiler seems not to like the syntax of some statements
> in:
>
> "subversion/tests/libsvn_fs/fs-test.c", line 5166: left operand must
> be modifiable lvalue: op "="
> "subversion/tests/libsvn_fs/fs-test.c", line 5167: left operand must
> be modifiable lvalue: op "="
>
> the following is concerned:
> struct path_rev_t pr1 = path_revs[i];
> struct path_rev_t pr2 = path_revs[j];
>
> while stating it directly works .... strange:
> struct path_rev_t pr1 = { "A", 1 };
> struct path_rev_t pr2 = { "A", 1 };

It's probably because the field "rev" of struct path_rev_t is declared
as being "const". Because of this, it's not allowed to assign
anything to a variable of this struct type. However, according to
§6.7.8:13 these declarations have the semantics of an initial value
and not an assignment, so unless I'm misinterpreting the standard
it should be allowed and there's a bug in the compiler that it treats
it as an assignment.

   // Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Aug 16 16:40:47 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.