From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10816 invoked by alias); 13 Jul 2013 01:53:45 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9028 invoked by uid 48); 13 Jul 2013 01:51:42 -0000 From: "ace.of.zerosync at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/29834] g++ thinks it is a declaration when it cannot be Date: Sat, 13 Jul 2013 01:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.1.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: ace.of.zerosync at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-07/txt/msg00686.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29834 --- Comment #13 from M.S. Babaei --- (In reply to James Kanze from comment #9) > Re using the init list syntax: it won't work if you have to be compatible > with other compilers (like Sun CC). Using something like (Doh (x)), ++x > seems to be the most portable work-around. Sorry, I didn't get your answer at first sight. Actually your elegant workaround is the most portable way. And, works on all compilers, too. Even pre-C++11 era compilers. Thanks.