From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10396 invoked by alias); 17 Mar 2008 15:49:00 -0000 Received: (qmail 10385 invoked by uid 22791); 17 Mar 2008 15:48:59 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og102.obsmtp.com (HELO exprod6og102.obsmtp.com) (64.18.1.183) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 17 Mar 2008 15:48:26 +0000 Received: from source ([192.150.20.142]) by exprod6ob102.postini.com ([64.18.5.12]) with SMTP; Mon, 17 Mar 2008 08:48:02 PDT Received: from inner-relay-3.eur.adobe.com (inner-relay-3b [10.128.4.236]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m2HFm0Gb011439; Mon, 17 Mar 2008 08:48:00 -0700 (PDT) Received: from fe2.corp.adobe.com (fe2.corp.adobe.com [10.8.192.72]) by inner-relay-3.eur.adobe.com (8.12.10/8.12.9) with ESMTP id m2HFlwiR029440; Mon, 17 Mar 2008 08:48:00 -0700 (PDT) Received: from namailgen.corp.adobe.com ([10.8.192.91]) by fe2.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 17 Mar 2008 08:47:58 -0700 Received: from 10.32.16.88 ([10.32.16.88]) by namailgen.corp.adobe.com ([10.8.192.91]) via Exchange Front-End Server namailhost.corp.adobe.com ([10.8.192.70]) with Microsoft Exchange Server HTTP-DAV ; Mon, 17 Mar 2008 15:47:58 +0000 User-Agent: Microsoft-Entourage/12.1.0.080305 Date: Mon, 17 Mar 2008 15:49:00 -0000 Subject: Re: Strange syntax error problem with mmorpg-framework From: John Love-Jensen To: Donald Duck , GCC-help Message-ID: In-Reply-To: <16094085.post@talk.nabble.com> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00161.txt.bz2 Hi Alex, The problem is probably in the expansion of the macros. >From the macros visible in the trunk/src/game/Player.cpp [5122:5445] diff, it is not apparent what the problem is, since not all macros involved are available in that diff. It appears that someone tried to make accessing the "value index" more regular, by introducing a PLAYER_SKILL_VALUE_INDEX macro function. Perhaps a glitch was introduced as well. In general, for C++, I strongly recommend avoiding macro functions and macro constants. Instead, use the C++ facilities of inline functions and const identifiers. There are a few exceptions to my C++ rule-of-thumb, such as assert macro functions. But the exceptions to the rule are very few. My advice is probably too late for the developers to adopt. Alas. You may be able to identify the problem if you compile that .cpp file with the g++ -E switch, and look at the post-preprocessed output. Sincerely, --Eljay